Retrieving Recordsets
Written by Eric Smith, Northstar Computer Systems LLC
If you need a read-only copy of data from a database to populate some sort of list or table, the best type of recordset to use is a forward-only, read-only recordset. The code to do this is shown below:
Dim dcnDB ' As ADODB.Connection
Dim rsData ' As ADODB.Recordset
Set dcnDB = Server.CreateObject("ADODB.Connection")
dcnDB.Open "some connection string"
Set rsData = dcnDB.Execute("SELECT * FROM LookupTable")
The default recordset is a read-only, forward-only recordset using this method.
Keywords: [
Uncategorized ASP Tips
]
Publication Date: 10/1/1999
|