sp_helpdb output

  • 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

  • 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


  • 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