Retrieving warnings from a stored procedure in ADO (VB6)



Hi all,

I have a ADO connection (DSN based) to a sybase 12.5.1 database.
I need to access the password expiration information from a user. I
therefore execute the following stored procedure: exec sp_displaylogin
[Username].
The info I need is part of the warnings returned, yet I do not know how to
access them with my ADO objects. Is that possible? I have seen articles on
how to do that on ADO.NET but not ADO.
Help wouild be highly appreciated.
Thanks,
Francois

Code so far:

'this opens a connection to the DB
OpenDBConnection dbconn, strDSN, strDBUserID, strDBPassword

Dim strLoginInfo As String
strLoginInfo = "exec sp_displaylogin " & strDBUserID

Dim cmd As ADODB.Command
Set cmd = New ADODB.Command
cmd.ActiveConnection = dbconn
cmd.CommandText = strLoginInfo
cmd.CommandType = adCmdText
Dim rs As ADODB.Recordset
Set rs = cmd.Execute()


' what now? the recordset is empty, the info I need is a warning

Set cmd = Nothing
rs.Close
Set rs = Nothing
CloseDBConnection dbconn

.



Relevant Pages

  • Re: Retrieving warnings from a stored procedure in ADO (VB6)
    ... > I have a ADO connection to a sybase 12.5.1 database. ... > OpenDBConnection dbconn, strDSN, strDBUserID, strDBPassword ... > Dim strLoginInfo As String ... > Set cmd = New ADODB.Command ...
    (microsoft.public.data.ado)
  • Re: mailmerge and sql
    ... means that you will not be able to see them in a database you open using the ... I believe you may have to use DAO instead of ADO to ... then creates a View containing a UNION query. ... Dim oCatalog As ADOX.Catalog ...
    (microsoft.public.word.mailmerge.fields)
  • Requery of Listbox does not display new data
    ... add a record to the database. ... Then the Lisbox control's requery method is ... The ADO command is run using a connection string to the mdb containing the ... Dim cmd As ADODB.Command ...
    (microsoft.public.access.formscoding)
  • Re: Member or Data Member not Found
    ... you've removed the reference to ADO. ... your declaration for tdf is incorrect. ... 2002 only references ADO, but you can add a reference to DAO. ... You must disambiguate as Dim rst As DAO.Recordset. ...
    (microsoft.public.access.formscoding)
  • Re: mailmerge and sql
    ... get data for a Mailmerge using ADO - i.e. you can get get data vcia ADO but ... and pass the Recordset as a parameter to that. ... > that is essentially a database application with a document ... >>Dim oCatalog As ADOX.Catalog ...
    (microsoft.public.word.mailmerge.fields)