Question : How can I run a stored procedure in ms sql server 2008 from excel 2003 vba

Please some one give me a simple example of connecting through vba to sql server 2008 from excel 2003 vba

Answer : How can I run a stored procedure in ms sql server 2008 from excel 2003 vba

Change this line

vConn = "Provider=SQLOLEDB;Data Source=Server;Initial Catalog=S;User ID=X;Password=Y"

to

vConn = "Provider=SQLOLEDB.1;Password=*****;Persist Security Info=True;User ID=sa;Data Source=111.111.11.111;Initial Catalog=master"

Here is connects to the database "master".  Change that to the name of your database that contains the SP dbo.usp_adduser2
Random Solutions  
 
programming4us programming4us