RecordSet Troubles

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
gpearson
Posts: 84
Joined: Wed Feb 03, 2010 12:55 pm

RecordSet Troubles

Post by gpearson » Thu Mar 11, 2010 8:23 pm

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
---
Graham Pearson
Goshen, IN USA

We Are Closed Today is your single internet resource for Indiana Area School Closings, Visit http://www.weareclosedtoday.com

massung
Posts: 93
Joined: Thu Mar 19, 2009 5:34 pm

Re: RecordSet Troubles

Post by massung » Thu Mar 11, 2010 8:41 pm

Take a look at revDataFromQuery... I think you'll find it much more to your liking. ;)

Jeff M.

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: RecordSet Troubles

Post by bangkok » Thu Mar 11, 2010 10:58 pm

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"

Post Reply