Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 (print t_sql) statement and adoconnection

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2003-11-10 : 07:19:35
zaher writes "if i use the (print t_sql) statement in my command
is there any way to get the message that is exsit
in (print t_sql) statement from adoconnection"

Stoad
Freaky Yak Linguist

1983 Posts

Posted - 2003-11-10 : 07:31:59
See Errors collection of ADODB.Connection:

Dim cn As New ADODB.Connection, e As ADODB.Error
cn.Open "provider=sqloledb;data source=(local);initial catalog=" & _
"myDB;user id=sa;password=;"

cn.Execute "exec qq"

For Each e In cn.Errors
MsgBox e.Description
Next
Go to Top of Page
   

- Advertisement -