Problem with value assigment

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
EDrob
Posts: 1
Joined: Tue 29 Sep 2020 08:40

Problem with value assigment

Post by EDrob » Tue 29 Sep 2020 08:47

Hey,

we get following Error:
Incorrect values within SQLDA structure
empty pointer to data
at SQLVAR index 0


when running the following code

Code: Select all

     
     storedProc := TIBCStoredproc.Create(NIL);
      try
        storedProc.Transaction := IBCTransaction;
        storedProc.Connection  := connection;
        storedProc.StoredProcName := 'PROCNAME';
        storedProc.Prepare;
        storedProc.ParamByName('DateTimeVar').asString := DateTimeToStr(dateTimeValue);
        storedProc.ParamByName('IntegerVar').asInteger := -1;
        storedProc.ExecProc;
Problematic is the following Line:

Code: Select all

storedProc.ParamByName('DateTimeVar').asString := DateTimeToStr(dateTimeValue);
If we change the Line of Code as follow

Code: Select all

storedProc.ParamByName('DateTimeVar').asDateTime := dateTimeValue;
we won't get the SQLDA Error but the Procedure still doesn't get executed.
Only if we access the return value at least one time the SP get's executed.

We experience this behavior since upgrading from 7.2.X to 7.3.X.

Anyone experience this behavior as well?
Any help appreciated!

Regards
EDrob

oleg0k
Devart Team
Posts: 190
Joined: Wed 11 Mar 2020 08:28

Re: Problem with value assigment

Post by oleg0k » Tue 29 Sep 2020 12:10

Hello,

To solve the issue, please try to set the the DescribeParams option to True:
IBSStoredProc.Options.DescribeParams := True;

wbr, Oleg
Devart Team

Post Reply