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
 General SQL Server Forums
 New to SQL Server Programming
 Retreive the SQL Server messages

Author  Topic 

spareus
Yak Posting Veteran

52 Posts

Posted - 2013-06-13 : 08:03:33
I am uploading data from Excel VBA to SQL table.
While doing that I need to ensure that the data is successfully added to table and further process is done.

For this, I want to be able to retreive the SQL Server messages returned by the server, such as errors, warning, PRINT statements, etc
like
(201 row(s) affected)
etc.

I need to retrive the same in VB.

Any help or pointers are much appreciated.

Regards,



Regards,
Spareus

bandi
Master Smack Fu Yak Hacker

2242 Posts

Posted - 2013-06-13 : 08:11:27
It might help you... there ADO code to print the rows affected
http://support.microsoft.com/kb/321686
lngRecsAff variable gives you the number of rows affected

--
Chandu
Go to Top of Page
   

- Advertisement -