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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Retreive the SQL Server messages
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

52 Posts

Posted - 06/13/2013 :  08:03:33  Show Profile  Reply with Quote
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
(201 row(s) affected)

I need to retrive the same in VB.

Any help or pointers are much appreciated.



Flowing Fount of Yak Knowledge

2242 Posts

Posted - 06/13/2013 :  08:11:27  Show Profile  Reply with Quote
It might help you... there ADO code to print the rows affected
lngRecsAff variable gives you the number of rows affected

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000