SQL Statement in Rev Wipes Out Table

Mark Wieder mwieder at ahsoftware.net
Mon Dec 12 13:35:37 EST 2005


Adam-

Monday, December 12, 2005, 5:12:46 AM, you wrote:

> put revDataFromQuery(,,myDB,"SELECT COUNT(*) FROM myTable") into myCount

> And I want to see the result by using:

> answer myCount

> Well I get zero (0).  The data in the table is gone after I execute that

Can't tell you why your data has gone missing, but...

I don't think revDataFromQuery() is really what you want here. Try

put revExecuteSQL(myDB, "SELECT COUNT(*) FROM myTable") into myCount

or create a recordset and use revNumberOfRecords():

revQueryDatabase(myRS, "SELECT * from myTable") into myRS
put revNumberOfRecords(myRS) into myCount

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list