Page 1 of 1

RecordSet Troubles

Posted: Thu Mar 11, 2010 8:23 pm
by gpearson
In my application I have been able to connect to an SQLite Database and be able to retrieve information from it. My inquiry is now that I have a recordset in this case one record, how can I parse that information to be able to set fields with this information so that it can be utilized in other parts of my application.

Code: Select all

put "Select * FROM Users" into tCheckUsersTable
put revQueryDatabase(gDBConnID, tCheckUsersTable) into tCheckUsersTableRecordSetID
put the result into tError
handleRevDBerror tError
I know from this that the query returned one record which it should. I have searched the Dictonary to see how I can do this without any luck. Any Suggestions

Re: RecordSet Troubles

Posted: Thu Mar 11, 2010 8:41 pm
by massung
Take a look at revDataFromQuery... I think you'll find it much more to your liking. ;)

Jeff M.

Re: RecordSet Troubles

Posted: Thu Mar 11, 2010 10:58 pm
by bangkok
massung wrote:Take a look at revDataFromQuery... I think you'll find it much more to your liking. ;).

Indeed. Much more practical.

put "Select * FROM Users" into tCheckUsersTable
revDataFromQuery(, , gDBConnID, tCheckUsersTable) into myResults

then

set itemdelimiter to tab

assume you have 2 records with 2 columns, then after it's easy to parse

For instance :

put item 1 of line 1 of myResults into fld "theResults"