[Lazarus] Problem with TSQLScript
c-soft at wp.pl
Fri Jul 19 11:20:52 CEST 2013
W dniu 19.07.2013 10:48, Ludo Brands pisze:
> On 07/18/2013 05:40 PM, Paul wrote:
>> I have problem with TSQLScript (?)
>> Script looks like that
>> SET TERM ^ ;
>> CREATE PROCEDURE GET_USER_PRIVILEGES (
>> USER_ACCOUNT VARCHAR(10))
>> RETURNS (
>> RESULT CHAR(1))
>> SELECT DISTINCT RDB$PRIVILEGE
>> FROM RDB$USER_PRIVILEGES
>> WHERE (RDB$USER = :USER_ACCOUNT)
>> INTO :RESULT
>> SET TERM ; ^
>> and the error message looks like that
>> -Dynamic SQL Error
>> -SQL Error Code = -104
>> Token unknown - line 11, column 11
>> line 11 -> INTO :RESULT
>> column 11-> :
>> FlameRobin does not have any problems with this piece of code
>> Any hints ?
> I think you have to set TSQLScript.UseSetTerm:=true. TSQLScript is
> parsing the script and executes queries one by one and needs to know
> what the "real" terminator is.
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
UseSetTerm is set to TRUE and Terminator to ";"
Without "SET TERM" directive in the script and terminator set to ^
result is the same :(
I tested other similar procedures, every time problem is somewhere
around "INTO :VARIABLE"
in the procedure code.
More information about the Lazarus