I want an easy way of calling stored procedure from VB.
Here is my first attempt
Private Sub Form_Load()
Dim rs As New ADODB.Record
Dim objCon As New ADODB.Connection
Dim cmd As New ADODB.Command
cmd.ActiveConnection = objCon
cmd.CommandText = "dbo.testproc syslogs" 'the stored pro and the paramter
cmd.CommandType = adCmdStoredProc
here is my stored procedure and it takes one parameter.
create procedure dbo.testproc(
select * from Sysobjects where name = @objectName
I know how to build parameters using cmd.Paramters.Append for each paramter but I don't want to build all the paramters as I want to call stored procedure with a lot of paramters for testing.