Hello Guys, At this time i will show to you on how to execute or call a stored procedure of
SQL Sever, here we go>>>>>>>>>>
Make sure that your Database Connection and Command, like shown at code below
Public MrCmd As ADODB.Command 'just put it on amodule
Public Conn As ADODB.Connection
i declare MrCmd as my ADODB.Command and Conn As ADODB.Connection as
Public for me to access or use it every-time i want, so you can write it like this
Set MrCmd = New ADODB.Command ' you must set MrCmd as New
MrCmd.CommandType = adCmdStoredProc 'since we are dealing with stored procedure
MrCmd.CommandText = "Get_Products" ' this is your Stored Procedure
MrCmd.Execute 'execute your stored procedure
MrCmd.ActiveConnection = Nothing 'set your connection close
Hope this will help
Happy Coding
The Hardest Thing to Do is to Do Nothing ^_^
SQL Sever, here we go>>>>>>>>>>
Make sure that your Database Connection and Command, like shown at code below
Public MrCmd As ADODB.Command 'just put it on amodule
Public Conn As ADODB.Connection
i declare MrCmd as my ADODB.Command and Conn As ADODB.Connection as
Public for me to access or use it every-time i want, so you can write it like this
Set MrCmd = New ADODB.Command ' you must set MrCmd as New
ADODB.Command
MrCmd.ActiveConnection = Conn ' this were your connection is being setMrCmd.CommandType = adCmdStoredProc 'since we are dealing with stored procedure
'let set the command type = adCmdStoredProc
MrCmd.CommandText = "Get_Products" ' this is your Stored Procedure
MrCmd.Execute 'execute your stored procedure
MrCmd.ActiveConnection = Nothing 'set your connection close
Hope this will help
Happy Coding
The Hardest Thing to Do is to Do Nothing ^_^
Leave a comment