tkuppinen
asked on
Disconnected recordset
This should be very simple but I just can't seem to get my head around this. I need a way to open a recordset from the client side and close the connection to the database. I then want to be able to use the recordset to bind to a datasource for a report. I'll start this out at 30 points and increase depending upon the comments given.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Dim rsTest As ADOR.Recordset, cmdTest As ADODB.Command
Set cmdTest = New ADODB.Command
Set rsTest = New ADOR.Recordset
cn.Open ("aps_test")
cmdTest.ActiveConnection = cn
cmdTest.CommandText = "select f_name from employees"
cmdTest.CommandType = adCmdText
rsTest.CursorLocation = adUseClient
rsTest.LockType = adLockOptimistic
rsTest.Open cmdTest
Set rsTest.ActiveConnection = Nothing
cn.Close
rsTest.MoveFirst
MsgBox rsTest("f_name")