Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2012-03

Reading results from a stored procedure

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Richard Mace

Hi All,
I am trying to call a firebird stored procedure (called GETALLUSERS) from within Lazarus (Win 7) using the following code:

fSQLQuery.SQL.Text := 'SELECT resultvar from GETALLUSERS';
fSQLQuery.Open;

However, I get an error saying that the table "GETALLUSERS" cannot be found. Could someone give me an example of how I can use the built in sqldb components to accomplish this?

Thanks in advance

Richard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120308/7900e364/attachment.html>

Reply by email

Antonio Fortuny
to Richard Mace

I use such constructs since a long time ago. Check maybe the following points:
1. is the user connected to the database allowed to use the procedure (grants)
2. the lazarus component should be a query allowing the application to obtain a cursor (TSQLQuery).

Otherwise I made a quick test and it works with IB Objects.

Antonio.

Le 08/03/2012 14:33, Richard Mace a ?crit :

Show quoted text 22 lines
Hi All, I am trying to call a firebird stored procedure (called GETALLUSERS) from within Lazarus (Win 7) using the following code: fSQLQuery.SQL.Text := 'SELECT resultvar from GETALLUSERS'; fSQLQuery.Open; However, I get an error saying that the table "GETALLUSERS" cannot be found. Could someone give me an example of how I can use the built in sqldb components to accomplish this? Thanks in advance Richard -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20120308/87de823d/attachment.html>

Reply by email