Android Question Help with Select Query

daveinhull

Active Member
Licensed User
Longtime User
Hi all,

I'm having real problems with a select query not working.

The table is created
B4X:
            sql1.ExecNonQuery("CREATE TABLE table1 (auto1 INTEGER PRIMARY KEY, col1 TEXT , col2 TEXT , col3 INTEGER, col4 INTEGER)")

And I'm trying to use this select query
B4X:
    myCursor = sql1.ExecQuery("SELECT Col2, Col3, Col4 FROM table1 WHERE auto1 = 7")

The actual table has an entry with auto1 = 7, but the query doesn't return any records.

I just can't see what I'm doing wrong, any thoughts anyone?

Thanks
 

daveinhull

Active Member
Licensed User
Longtime User
Hi Klaus,

Thanks for the reply, but I've just worked out what I was doing wrong. I wasn't setting the cursor position before trying to access the data. Habit of MS Access where the returned pointer is at the first record.

All sorted now.

Thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…