SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

spareus
Yak Posting Veteran

India
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
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
Flowing Fount of Yak Knowledge

India
2206 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
http://support.microsoft.com/kb/321686
lngRecsAff variable gives you the number of rows affected

--
Chandu
Go to Top of Page
  Previous Topic Topic Next Topic  
 New 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.06 seconds. Powered By: Snitz Forums 2000