Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-22 Thread Toru Takubo
(2013/04/22 17:06), LacaK wrote: Toru Takubo wrote / napísal(a): Hi Dmitry, Thank you very much for your advice. I am sure your code should work, but unfortunately I can not modify the existing stored procedures. I will explain what I have been trying so far. Suppose you are using the followi

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-22 Thread LacaK
Toru Takubo wrote / napísal(a): Hi Dmitry, Thank you very much for your advice. I am sure your code should work, but unfortunately I can not modify the existing stored procedures. I will explain what I have been trying so far. Suppose you are using the following stored procedure,

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-21 Thread Marcos Douglas
On Sun, Apr 21, 2013 at 11:18 PM, Toru Takubo wrote: > > (snip) > >> >>> I will try to proceed. On the other hand, I'm wondering if TSQLQuery >>> (or TMSSQLConnection) would natively support OUTPUT parameter and >>> RETURN_VALUE... >> >> >> Well, even using Delphi (4~7) I never used RETURN_VALUE.

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-21 Thread Toru Takubo
(2013/04/22 10:46), Marcos Douglas wrote: On Sun, Apr 21, 2013 at 10:05 PM, Toru Takubo wrote: (2013/04/20 23:06), Marcos Douglas wrote: On Sat, Apr 20, 2013 at 2:47 AM, Toru Takubo wrote: (2013/04/19 21:22), Marcos Douglas wrote: (snip) With analogical thinking, I expected that

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-21 Thread Marcos Douglas
On Sun, Apr 21, 2013 at 10:05 PM, Toru Takubo wrote: > > (2013/04/20 23:06), Marcos Douglas wrote: >> >> On Sat, Apr 20, 2013 at 2:47 AM, Toru Takubo wrote: >>> >>> (2013/04/19 21:22), Marcos Douglas wrote: >>> (snip) >>> > > With analogical thinking, I expected that the followi

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-21 Thread Toru Takubo
(2013/04/20 23:06), Marcos Douglas wrote: On Sat, Apr 20, 2013 at 2:47 AM, Toru Takubo wrote: (2013/04/19 21:22), Marcos Douglas wrote: (snip) With analogical thinking, I expected that the following might work for TSQLQuery in FPC: var r,i: Integer; DBQ: TSQLQuery; begin ...

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-20 Thread Marcos Douglas
On Sat, Apr 20, 2013 at 2:47 AM, Toru Takubo wrote: > (2013/04/19 21:22), Marcos Douglas wrote: >> > (snip) > >>> >>> With analogical thinking, I expected that the following might work >>> for TSQLQuery in FPC: >>> >>> var >>>r,i: Integer; >>>DBQ: TSQLQuery; >>> begin >>> ... >>> DBQ.S

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-19 Thread Toru Takubo
(2013/04/19 21:22), Marcos Douglas wrote: On Fri, Apr 19, 2013 at 4:26 AM, Toru Takubo wrote: Hi Dmitry, Thank you very much for your advice. I am sure your code should work, but unfortunately I can not modify the existing stored procedures. I will explain what I have been trying so far. Supp

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-19 Thread dmitry boyarintsev
It appears that SQLdb doesn't support (MS) SQL variables. thanks, Dmitry On Fri, Apr 19, 2013 at 8:29 AM, Marcos Douglas wrote: > On Fri, Apr 19, 2013 at 9:22 AM, Marcos Douglas wrote: > > On Fri, Apr 19, 2013 at 4:26 AM, Toru Takubo > wrote: > >> Hi Dmitry, > >> > >> Thank you very much for

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-19 Thread Marcos Douglas
On Fri, Apr 19, 2013 at 9:22 AM, Marcos Douglas wrote: > On Fri, Apr 19, 2013 at 4:26 AM, Toru Takubo wrote: >> Hi Dmitry, >> >> Thank you very much for your advice. I am sure your >> code should work, but unfortunately I can not modify >> the existing stored procedures. >> >> I will explain what

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-19 Thread Marcos Douglas
On Fri, Apr 19, 2013 at 4:26 AM, Toru Takubo wrote: > Hi Dmitry, > > Thank you very much for your advice. I am sure your > code should work, but unfortunately I can not modify > the existing stored procedures. > > I will explain what I have been trying so far. > Suppose you are using the following

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-19 Thread Toru Takubo
Hi Dmitry, Thank you very much for your advice. I am sure your code should work, but unfortunately I can not modify the existing stored procedures. I will explain what I have been trying so far. Suppose you are using the following stored procedure, --

Re: [fpc-pascal] How can retrive value from OUT parameter?

2013-04-18 Thread dmitry boyarintsev
Hello Toru, Not sure if it works with SQLdb or ADO, but it has been working for some other tasks that I've been involved with (not FPC, but delphi based, though). You can have the result as through the select statement. Have a TSQLQuery to run the following query: SET NOCOUNT ON declare @var1 in

[fpc-pascal] How can retrive value from OUT parameter?

2013-04-17 Thread Toru Takubo
Hi All, I have an application build with Delphi7+ADO connecting to MSSQL database, and planning to migrate to FPC+SQLdb. It has many stored procedures which have OUT parameters to retrieve value from database. I am trying to migrate by using TMSSQLConnection+TSQLQuery, but still I can not settle