G
Guest
I am attempting to retrieve a single row with a SELECT that contains a LIKE
clause.
I build the SELECT string in subroutine and open a record set via an EXECUTE
as in the following example:
Set rsPrimaryID = adoCon.Execute(sqlFindPrimaryID)
The SQL in the string looks like:
SELECT DMX_Entries.Description, DMX_Entries.EntryId ,
DMX_Entries.CollectionId FROM DMX_Entries WHERE ((DMX_Entries.Description)
LIKE 'AI - Primary*');
When this string is copied and pasted into a query that has a linked table
defined, it works. When this is executed in code, I get a record count of
zero. The open of the connection (ODBC) appears to be working. There are no
errors when the SQL is executed, and the record set object appears to be
created, its just empty. I have removed the where clause and get records
back. There is something about the where clause that appears to behave
differently in code than in native SQL.
Can anyone help me?
clause.
I build the SELECT string in subroutine and open a record set via an EXECUTE
as in the following example:
Set rsPrimaryID = adoCon.Execute(sqlFindPrimaryID)
The SQL in the string looks like:
SELECT DMX_Entries.Description, DMX_Entries.EntryId ,
DMX_Entries.CollectionId FROM DMX_Entries WHERE ((DMX_Entries.Description)
LIKE 'AI - Primary*');
When this string is copied and pasted into a query that has a linked table
defined, it works. When this is executed in code, I get a record count of
zero. The open of the connection (ODBC) appears to be working. There are no
errors when the SQL is executed, and the record set object appears to be
created, its just empty. I have removed the where clause and get records
back. There is something about the where clause that appears to behave
differently in code than in native SQL.
Can anyone help me?