I need to create a sqldatasource which connect to SQL Server 7 using OLEDbDataSource. The select involves two stored procedures and each procedure takes a parameter.
My question is how do I pass in the two parameters to the stored procedures correctly?
I tried to add the following :
protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e) {
e.Command.Parameters.Add(new OleDbParameter("@dealer", dealerCode));
}
But I got the following error message:
"Procedure 'spINVOICE' expects parameter '@dealer', which was not supplied. "
Can somebody help, please?
My question is how do I pass in the two parameters to the stored procedures correctly?
I tried to add the following :
protected void SqlDataSource1_Selecting(object sender, SqlDataSourceSelectingEventArgs e) {
e.Command.Parameters.Add(new OleDbParameter("@dealer", dealerCode));
}
But I got the following error message:
"Procedure 'spINVOICE' expects parameter '@dealer', which was not supplied. "
Can somebody help, please?