January 7, 2009 at 6:03 am
Hi,
all examples I see are eihter done with a query manager or too simple. I'd like to have an example in VB6 with ADO.
This is how I start:
Dim oConn As ADODB.Connection
Dim szSQL As String
Set oConn = New ADODB.Connection
On Error GoTo ERRfnCheckDatabaseEX
oConn.Open "Provider=SQLOLEDB.1;" & _
"Data Source=(local);" & _
"User ID=" & "Admin" & ";" & _
"Password=" & "Adpw1"
szSQL = " sp_helpdb "
oConn.Execute szSQL
This works without error. But How do I get the results?:crying:
Thanks in advance
January 7, 2009 at 6:44 am
You could write something like....
Dim oConn As ADODB.Connection
Dim szSQL As String
Dim rs AS New ADODB.Recordset
Set oConn = New ADODB.Connection
On Error GoTo ERRfnCheckDatabaseEX
oConn.Open "Provider=SQLOLEDB.1;" & _
"Data Source=(local);" & _
"User ID=" & "Admin" & ";" & _
"Password=" & "Adpw1"
szSQL = " sp_helpdb "
SET rs = oConn.Execute szSQL
--Ramesh
January 7, 2009 at 9:17 am
Puh, that hurts, but I did'nt know. Thanks a lot.
edv
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy