S
S
SoadMis2018-06-03 14:46:16
Java
SoadMis, 2018-06-03 14:46:16

Problems that I execute request and result leaves only when the first record in a DB is appropriated to the cursor. In other cases, there is no result, how?

c = database.rawQuery("SELECT width750to1000 FROM depth WHERE _id = 4",null);

                if (c!=null && c.moveToFirst() ){
                    String str;
                    do{
                        
                        str = c.getString(c.getColumnIndexOrThrow("width750to1000"));
                        textView.setText(str);

                    }
                    while (c.moveToNext());

                }
                c.close();

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question