Unanswered: How to Pass a Parameter to Stored Procedure?
How do you pass a parameter to a SQL Server stored procedure? All I need is to supply one date and a report is to output but I can't figure out how to get the date to the procedure. I can do is in SQL Server using Query Analyzer but I don't know VB well enough. I am using VB 6.0 for this. I created a very, very simple ADODC and one text box. I got VB to connect to the database all right but I can't set the text box's DataField property to the field I want because the parameter is missing.
Dim cmdobj As ADODB.Command
Set cmdobj = New ADODB.Command
Dim paramObj As ADODB.Parameter
Set paramObj = New ADODB.Parameter
Set paramObj = .CreateParameter("ReportDt", adDate, adParamInput, , your date value)
Set paramObj = .CreateParameter("NextParam", adDate, adParamInput, , nextparameter)