pro_vb thread: AW: SV: ADO Connection ...
AW: [pro_vb] SV: ADO Connection ...
oo deam i am too stupid
i was only looking for a option on the connection object
its to easy :/
THX Kilian
-----Ursprüngliche Nachricht-----
Von: keith [mailto:keith@p...]
Gesendet: Dienstag, 24. September 2002 14:55
An: professional vb
Betreff: [pro_vb] SV: ADO Connection ...
Well of course killian ;) and its known as a disconnected recordset.
You can try this!
'To connect to the DB (Whichever DB it may be)
Set Conn = CreateObject("ADODB.Connection")
'To use to hold recordset info
Set RecordSet = CreateObject("ADODB.Recordset")
'OPen a connection to the DB
Conn.Open ConnStr
' Setting the cursor location to client side is important
' to get a disconnected recordset.
RecordSet.CursorLocation = adUseClient
RecordSet.Open DBTask, Conn, ADODB.adOpenForwardOnly,
ADODB.adLockBatchOptimistic
'Pass out the recordset
Set GetDBInformation = RecordSet
' Disconnect the recordset.
Set RecordSet.ActiveConnection = Nothing
'Close the connection to the DB
Conn.Close
now you have closed the connection you can still browse the
Recordset
'Now destroy the connection and the recordset
Set Conn = Nothing
Set RecordSet = Nothing
-----Ursprungligt meddelande-----
Från: rds [mailto:rds@a...]
Skickat: den 24 september 2002 14:44
Till: professional vb
Ämne: [pro_vb] ADO Connection ...
Is there a way to close the connection in a ADODB.Connection object
without loosing the recordset data
Cheers Kilian
---
Visual C# - A Guide for VB6 Developers
This book will make it easy to transfer your skills
from Visual Basic 6 to C#, the language of choice
of the .NET Framework.
http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059
---
Visual C# - A Guide for VB6 Developers
This book will make it easy to transfer your skills
from Visual Basic 6 to C#, the language of choice
of the .NET Framework.
http://www.wrox.com/ACON11.asp?ISBN=1861007175&p2p0059