开发者

How to query SQLDatabse for certain Row and Colum?

开发者 https://www.devze.com 2023-03-16 23:55 出处:网络
I would like to query the database by using the certain row id, and then get a certain column. Here is the code im trying to implement it in. Ive tried cursor already but that didnt work.

I would like to query the database by using the certain row id, and then get a certain column. Here is the code im trying to implement it in. Ive tried cursor already but that didnt work.

public class bookLookup extends Activity {
WebView webView;
private DbAdapter mDbHelper;
private String bookName;
private SQLiteDatabase mDb;
@Override
public void onCreate(Bundle savedInstanceState){
    super.onCreate(savedInstanceState);
    setContentView(R.layout.book_browser);  
    开发者_Go百科webView = (WebView)findViewById(R.id.webkit);
    Bundle extras = getIntent().getExtras();
    long id = extras.getLong("rowId");


    String url = "http://www.wikipedia.org/wiki"+bookName;

    webView.setWebViewClient(new BookLookupbrowser());

    webView.getSettings().setJavaScriptEnabled(true);
    webView.loadUrl(url);

If anyone can help it will be greatly appreciated.


Im sick of seeing these darn questions from you which show no trying... read this and try please!

http://code.google.com/p/android-notes/source/browse/trunk/src/com/bitsetters/android/notes/DBHelper.java?r=10

http://developer.android.com/resources/browser.html?tag=data

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号