i am trying out UNIDAC for delphi 2010 and converteda part of program written in delphi 7 with the BDE components, it usses a microsoft access database.
I get an error from the microsoft odbc driver when i execute the following sql statement :
'SELECT ID, Achternaam, VoorNaam, PostCode, Adres, Plaats, Sexe, Active FROM Klant_naw where Achternaam like "a*" and Active = True order by Achternaam'
The error is : not enough parameters, 1 expected...
if i leave out the part 'where Achternaam like "a*"' i get all records so the connection to the database is ok
I must be doing something wrong with the 'like "a*" part but i tried the % sign as wildcard and that didn't help
I also tried the sql statement in microsoft access and there it is working .
Can someone tell me what i am doing wrong ??
Thanks in advance
Ed
odbc error
Hello
Please try the following query (single quote instead of double and '%' instead of '*'):
This behavior is defined in the Microsoft ODBC driver that is used to connect to MS Access database and we cannot change this behavior. So, you should modify LIKE conditions in your queries.
Please try the following query (single quote instead of double and '%' instead of '*'):
Code: Select all
SELECT ID, Achternaam, VoorNaam, PostCode, Adres, Plaats, Sexe, Active FROM Klant_naw where Achternaam like 'a%' and Active = True order by Achternaam