CodeHammer
Programmer
The following query:
select * from customer where displayname like '*farm*'
works perfectly when used inside Access. It returns 44 records. However when the following code is executed
SQL$ = "select * from customer where displayname like '*farm*'"
Set clsadoRec = clsadoCon.Execute(SQL$)
t% = 0
If Not clsadoRec.BOF And Not clsadoRec.EOF Then
While Not clsadoRec.EOF
t% = t% + 1
clsadoRec.MoveNext
Wend
End If
CustomerCount = t%
clsadoRec.Close
Does not work. It returns 0 records. All connections to the DB are open correctly. In fact, this same code works properly when the "LIKE" keyword is not used in the SQL statement. Anyone got any ideas?
select * from customer where displayname like '*farm*'
works perfectly when used inside Access. It returns 44 records. However when the following code is executed
SQL$ = "select * from customer where displayname like '*farm*'"
Set clsadoRec = clsadoCon.Execute(SQL$)
t% = 0
If Not clsadoRec.BOF And Not clsadoRec.EOF Then
While Not clsadoRec.EOF
t% = t% + 1
clsadoRec.MoveNext
Wend
End If
CustomerCount = t%
clsadoRec.Close
Does not work. It returns 0 records. All connections to the DB are open correctly. In fact, this same code works properly when the "LIKE" keyword is not used in the SQL statement. Anyone got any ideas?