VBA Code that connects Database and execute a stored procedure through a click of button in excel 2013.
i am new to VBA,can anyone please help me with this to write a VBA code that Connect Sql Sever Database and execute a stored procedure through a click of button in excel 2013. Details below: Server name - LE64-08\SQL2012 Database Name- MDS Authentication Type - Windows Authentication Stored Procedure Name - LoadSP any help would be really appreciated.
You will need to investigate SQL Server SMO, looking for Server and database connections along with how to execute a query on MSDN. Most MSDN examples have VB versions so the conversion to VBA should be pretty simple - take a look at this page for a starter: