-
You'll have to forgive me here, but I'm new to ADO!
I'm trying to select a record from a table called ClientProfile, depending on the value of the Surname column.
I've used the same statement I would have used with DAO: -
"SELECT * FROM ClientProfile WHERE Surname LIKE 'D*';"
This should return the details of Mr Quacky Duck. But it doesn't!
if I run: -
"SELECT * FROM ClientProfile WHERE Surname = 'Duck';" I get old Quacky's personals, so I know he's hiding in there somewhere.
I'm obviously missing something fundamental here. Can anyone shed any light on this one??
-
Change your asterisk to a percent sign:
"SELECT * FROM ClientProfile WHERE Surname LIKE 'D*';"
should be
"SELECT * FROM ClientProfile WHERE Surname LIKE 'D%'"
-
Access uses an "*" whereas MS-SQL uses a "%"
:) :)