Retrieving warnings from a stored procedure in ADO (VB6)
- From: "Djobi djoba" <Djobi djoba@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 30 Jun 2005 09:49:02 -0700
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
.
- Follow-Ups:
- Re: Retrieving warnings from a stored procedure in ADO (VB6)
- From: William \(Bill\) Vaughn
- Re: Retrieving warnings from a stored procedure in ADO (VB6)
- Prev by Date: Re: Parameter to a Stored Procedure
- Next by Date: What happens to non-commited transaction
- Previous by thread: should I close connection?
- Next by thread: Re: Retrieving warnings from a stored procedure in ADO (VB6)
- Index(es):
Relevant Pages
|
|