Hi
I have a windows application with an Access database where I execute the following:
cmd.CommandText = "SELECT Id FROM Users WHERE surname LIKE \"p*\"";
I'm trying to find all users who's surname starts with "P".
When I fill a dataset using the above no results are returned but when I take that exact string and run it directly in Access it returns the correct Id.
Any ideas why (or how if im doing it incorrecly) no data is being returned? The connection and everything else is fine because if I do a simple SELECT id FROM users it returns records.
I have promised myself to never use access as a database again as I have had countless problems thus far where an SQL Express database wouldnt have.
Thanks
Stefan
I have a windows application with an Access database where I execute the following:
cmd.CommandText = "SELECT Id FROM Users WHERE surname LIKE \"p*\"";
I'm trying to find all users who's surname starts with "P".
When I fill a dataset using the above no results are returned but when I take that exact string and run it directly in Access it returns the correct Id.
Any ideas why (or how if im doing it incorrecly) no data is being returned? The connection and everything else is fine because if I do a simple SELECT id FROM users it returns records.
I have promised myself to never use access as a database again as I have had countless problems thus far where an SQL Express database wouldnt have.
Thanks
Stefan
Comment