P
Paul Cram
Hi
I have the following
strCompany = "*" & Me.CompanyName & "*"
Set cmdCompany = New ADODB.Command
With cmdCompany
.ActiveConnection = adoConnection
.CommandText = "qryCompany"
.CommandType = adCmdStoredProc
Set prmCompany = cmdCompany.CreateParameter("CompanyName", adChar,
adParamInput, 50)
.Parameters.Append prmCompany
prmCompany.Value = strCompany
End With
Set rsCompany = cmdCompany.Execute
When I run this I end up with an emty recordset. If I run the query
separately manually adding the criteria it reutuns records.
What am I missing?
Regards
Paul
I have the following
strCompany = "*" & Me.CompanyName & "*"
Set cmdCompany = New ADODB.Command
With cmdCompany
.ActiveConnection = adoConnection
.CommandText = "qryCompany"
.CommandType = adCmdStoredProc
Set prmCompany = cmdCompany.CreateParameter("CompanyName", adChar,
adParamInput, 50)
.Parameters.Append prmCompany
prmCompany.Value = strCompany
End With
Set rsCompany = cmdCompany.Execute
When I run this I end up with an emty recordset. If I run the query
separately manually adding the criteria it reutuns records.
What am I missing?
Regards
Paul