mcaron
August 11th, 1999, 10:43 AM
How is it possible to open a ADO.Recordset with two or more parameters. Heres my example:
objCmd.CommandText = "SELECT tblAthlètes.AthlètesId, tblAthlètes.Prénom_Ath, tblAthlètes.Nom_Ath" _
& " From tblAthlètes" _
& " WHERE (((tblAthlètes.Prénom_Ath)= ?) AND ((tblAthlètes.Nom_Ath)= ?))"
objCmd.CommandType = adCmdText
objCmd.Parameters(0).Value = strCriteria1
objCmd.Parameters(1).Value = strCriteria2
Using this code gives this error on the line objCmd.Parameters(0).Value... : "Run-Time error.
The provider cannot derive Parameter info and SetParameterInfo has not been called". What is the reason for this message and how to resolve this problem? All I want to do is replace the two quotation marks with some criterias.
Can anyone help me please. Thanks for your time.
objCmd.CommandText = "SELECT tblAthlètes.AthlètesId, tblAthlètes.Prénom_Ath, tblAthlètes.Nom_Ath" _
& " From tblAthlètes" _
& " WHERE (((tblAthlètes.Prénom_Ath)= ?) AND ((tblAthlètes.Nom_Ath)= ?))"
objCmd.CommandType = adCmdText
objCmd.Parameters(0).Value = strCriteria1
objCmd.Parameters(1).Value = strCriteria2
Using this code gives this error on the line objCmd.Parameters(0).Value... : "Run-Time error.
The provider cannot derive Parameter info and SetParameterInfo has not been called". What is the reason for this message and how to resolve this problem? All I want to do is replace the two quotation marks with some criterias.
Can anyone help me please. Thanks for your time.