LIKE Operator

Hi All.

I'm having trouble with using the Like Operator from VB using the Adodc control.

As a test, I have 1-field, 1-record in a 1-table database:
Table: Test
Field: Keyword
Value: Testing

I have my adodc connection string set up working fine.

I try this query: "SELECT * FROM Test"
And it selects the one record it fine.

The problem comes when I add the LIKE Operator to a WHERE clause:
"SELECT * FROM Test WHERE Keyword LIKE 'T*'"

This returns no records. This is extremly strange because I put the same query in Access, and it will select the record fine.

Am I missing some sort of lack-of-support when it comes to the LIKE Operator and ADODC This is seriously driving me insane.

Any help would be greatly appreciated THANKS



Answer this question

LIKE Operator

  • guiticom1304

    Presumably you are querying a non-access database. Access has some non-standard features when it comes to SQL Statements: i recall that the wild card selection was one of them, but it's been a while since I used access for anything.

  • alpha1105omega

    A HA

    So I changed the query to:
    "SELECT * FROM Test WHERE Keyword LIKE '%T%'"

    And it selects it fine in VB....
    Interesting to note though that it DOES NOT select fine in Access -- it returns 0 records.


  • LIKE Operator