Link to home
Start Free TrialLog in
Avatar of tkuppinen
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
Avatar of Juilette
Juilette

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of tkuppinen
tkuppinen

ASKER

Actually, I was able to find the answer I was looking for by looking at another question.  I'll post the answer I came up with and give juliette the pointsd just to add this to the archive.n  This is part of a test system and to implement this in an n-tier application there will be modifications but I think the general idea is here.

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")