My Query works in WorkBench but not in Delphi 2010, Keep getting error about Syntax.
I am using Delphi 2010 to write a program to access my database on MySQL. Due to the contents in one table i have to encrypt the data therefore before using the data in the table i have to decrypt it, recover the necessary fields and then encrypt again. The following Query works in WorkBench:
Update hillfrpro.users
Set `Password`= AES_DECRYPT(`Password`,'****');
Update hillfrpro.users
Set `Security Question` = AES_DECRYPT(`Security Question`,'****');
Update hillfrpro.users
Set `Security Answer` = AES_DECRYPT(`Security Answer`,'****');
Select * From hillfrpro.users
Where `User Name` = :Users;
Update hillfrpro.users
Set `Password`= AES_ENCRYPT(`Password`,'****');
Update hillfrpro.users
Set `Security Question` = AES_ENCRYPT(`Security Question`,'****');
Update hillfrpro.users
Set `Security Answer` = AES_ENCRYPT(`Security Answer`,'****');
[the **** represents a word by the way!]
However when entered into Delphi i get the following error:
'You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near';
Set Security Question = AES_DECRYPT(Security Question' at line 2'
if anyone can help me and tell me what im doing wrong it would be really helpful, thanks
Edited 1 time(s). Last edit at 03/02/2011 07:26AM by Fraser Hill.
Subject
Written By
Posted
My Query works in WorkBench but not in Delphi 2010, Keep getting error about Syntax.
March 02, 2011 07:25AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.