Using Recordsets
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2010
11:14 PM
04-14-2010
11:14 PM
Using Recordsets
I've loaded some data into a recordset using the following code:
Set connDB1 = DatabaseUtils.getDBConnection(PROVIDER, DBPATH, DBNAME)
rs = connDB1.execute ("SELECT * FROM TradeData WHERE ScenarioID = "& scenarioNumber)
The recordset (rs) is populated correctly, however this query should return 2 rows. I would therefore expect to able to use commands like
rs.eof
rs.movenext
etc
These don't seem to be available and without them the recordset is fairly useless. How do I get them to work? I am using VBScript as my language
Set connDB1 = DatabaseUtils.getDBConnection(PROVIDER, DBPATH, DBNAME)
rs = connDB1.execute ("SELECT * FROM TradeData WHERE ScenarioID = "& scenarioNumber)
The recordset (rs) is populated correctly, however this query should return 2 rows. I would therefore expect to able to use commands like
rs.eof
rs.movenext
etc
These don't seem to be available and without them the recordset is fairly useless. How do I get them to work? I am using VBScript as my language
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2010
11:35 PM
04-14-2010
11:35 PM
The solution was to use this:
set rs = connDB1.execute ("SELECT * FROM TradeData WHERE ScenarioID = "& scenarioNumber)
instead of this
rs = connDB1.execute ("SELECT * FROM TradeData WHERE ScenarioID = "& scenarioNumber)
set rs = connDB1.execute ("SELECT * FROM TradeData WHERE ScenarioID = "& scenarioNumber)
instead of this
rs = connDB1.execute ("SELECT * FROM TradeData WHERE ScenarioID = "& scenarioNumber)
