MS SQL raiseerror not returned to ADO error collection 
Author Message
 MS SQL raiseerror not returned to ADO error collection

I'm using VB6, ADO 2.5 with MS SQL 7.0 and my problem is that if I use the
T-SQL raiseerror command I see that it is not raising an error in my ADO
connection error collection.   If you have any ideas I'd appreciate hearing
from you.

=======================================
T-SQL from a stored procedure
raiserror('My update message text',16,1).

=======================================
VB ADO Code in a MTS COM object
    On Error GoTo errorHandler

    ' Create the ADO objects
    Dim cmd As ADODB.Command
    Set cmd = CtxCreateObject("ADODB.Command")

    ' Init the ADO objects & the stored proc parameters
    cmd.ActiveConnection = GetConnectionString()
    cmd.CommandText = strSP
    cmd.CommandType = adCmdStoredProc
    collectParams cmd, params

    ' Execute the query without returning a recordset
    cmd.Execute , , ADODB.adExecuteNoRecords  <===== ADO error should be
raise at this execute

    ' Cleanup and return nothing
    Set cmd.ActiveConnection = Nothing
    Set cmd = Nothing
    Exit Function



Sat, 31 May 2003 09:34:18 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. MS SQL raiseerror not returned to ADO error collection

2. ADO does not always return Errors collection from SQL 2000

3. VB not recognizing RAISEERROR (SQL Server)?

4. VB ADO recordset returned from MS SQL

5. MS ADO / Sybase SQL Anywhere ASA 7 Stored Procedure Return Value Problem

6. HELP!!!!, using ADO + SQL 2000 + Stored procedures does not return a value

7. HELP!!!!, using ADO + SQL 2000 + Stored procedures does not return a value

8. SQL Statement returns records in Access but not in ADO

9. ADO does not return SQL Server Identity value

10. Trouble with ADO Connection.Open() Error 3625 Item not found in collection

11. ADO Errors collection and SQL Server 7

12. ADO 2.6 Error Collection and SQL Server 2000

 

 
Powered by phpBB® Forum Software