Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 3 of 3 total
Thread Alter Table - Encryption
Mon, Dec 21 2009 12:15 PMPermanent Link

"AlanL"
Hello,
I am having problems with syntax when using SQL method for encrypting a data
file. Could someone please help.
This is the error generated when the statements below are run.
"DBISAM Engine Error # 11949 SQL Parsing error - Expexcted String but
instead found abc in ALTER TABLE SQL Statement at
line 2, column 16."

SQL.Clear ;
SQL.Add ('ALTER TABLE DF20');
SQL.Add ('ADD if not exists GroupType VARCHAR(10)');
Sql.Add ('Encrypted With ' + DEFAULT_PASSWORD);
ExecSQL;

many thanks,
AlanL
Mon, Dec 21 2009 3:25 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Alan,

The encryption password must be string literal, so you must enclose the
password in single quotes.
Please try this:

....
Sql.Add ('Encrypted With ' + QuotedStr(DEFAULT_PASSWORD) );
....


--
Fernando Dias
[Team Elevate]
Mon, Dec 21 2009 6:58 PMPermanent Link

"AlanL"
It is working now !
thank you Fernando for your help.
regards
AlanL

"Fernando Dias" <fernandodiasAremovthis.easygate.com.pt> wrote in message
news:BA359382-48E8-4B0F-8156-7A2A33DD49DE@news.elevatesoft.com...
> Alan,
>
> The encryption password must be string literal, so you must enclose the
> password in single quotes.
> Please try this:
>
> ...
> Sql.Add ('Encrypted With ' + QuotedStr(DEFAULT_PASSWORD) );
> ...
>
>
> --
> Fernando Dias
> [Team Elevate]
>
Image