Hi,
Is it possibly to execute SQL stored procedures with parameters from VB application?
Thank you.
Printable View
Hi,
Is it possibly to execute SQL stored procedures with parameters from VB application?
Thank you.
Hello there,
I found this in the MSDN online help at MS. From the KB #Q174223
Hope this helpsCode:Cmd1.ActiveConnection = Conn1
Cmd1.CommandText = "sp_AdoTest"
Cmd1.CommandType = adCmdStoredProc
Cmd1.Parameters.Refresh
Cmd1.Parameters(1).Value = 10
Yes it is. You can use ADO Command and Parameter objects. I have examples of it at work, but basically what you do is set your parameters, append them to the Command object and then execute. You can also execute a stored procedure from a Connection object using "Connection.Execute SQLStatement" where the SQLStatment is an execution of the stored procedure just like you would do in SQL Server 7. (Exec spp_insert_master @Variable1 = FirstInput, @Variable2 = SecondInput, etc.)
You can also use UserConnection object to execute the stored procedures if u are using RDO.