[Lazarus] Problem with TSQLScript
Reinier Olislagers
reinierolislagers at gmail.com
Fri Jul 19 09:38:39 CEST 2013
On 18/07/2013 17:40, 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))
> AS
> BEGIN
> FOR
> SELECT DISTINCT RDB$PRIVILEGE
> FROM RDB$USER_PRIVILEGES
> WHERE (RDB$USER = :USER_ACCOUNT)
> INTO :RESULT
> DO
> BEGIN
> SUSPEND;
> END
> END
> ^
> SET TERM ; ^
>
> and the error message looks like that
> {...}PrepareStatement
> -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 ?
> Paul
>
> I use Lazarus 1.0.10, Firebird 2.5 on Ubuntu 32bit
Not really, except it's a Firebird error and it would be interested to
know what actually gets passed to the Firebird engine (to verify if that
runs in FlameRobin).
Perhaps sqldb logging [1] would work for that?
[1]
http://wiki.lazarus.freepascal.org/SqlDBHowto#Troubleshooting:_TSQLConnection_logging
More information about the Lazarus
mailing list