
multiple parameters with ADO and SQL Server 2000 Stored proc
Hi Tommy.
You can use a command and create parameters.
Sample code:
Dim comDemo As ADODB.Command
'Call Stored Procedure inside SQL-Servercommandobject
Set comDemo = New ADODB.Command
With comDemo
.ActiveConnection = cnDemo
.CommandType = adCmdStoredProc
.CommandText = "Demo" 'This is the SP name
.Parameters.Append comGreefa.CreateParameter"ArtNr",
adVarChar, adParamInput, 40, strArtNr)
.Parameters.Append comGreefa.CreateParameter("RecSoort",
adInteger, adParamInput, 2, RecSoort)
.Parameters.Append comGreefa.CreateParameter("strXML",
adVarBinary, adParamInput, UBound(oXml) + 1, oXml)
.Execute
End With
You can define as many parameters as you like. It has to
be in the same order as your SP.
Succes.
Geert