Board index » delphi » TIBStoredProc

TIBStoredProc

Hi,

After installing new version of IBX 4.62 for BCB 5
TIBStoredProc seems not working correct.

I have a proc that returns a Integer; but the number is fault
(alwayse 3)

The StoredProc executet from IBConsole run's ok.

Do i have to change back to older Version ?

 

Re:TIBStoredProc


Hi

to my question:

It is not the TIBStoredProc the difference is the Locate-function
from the TIBDataSet. With empty Option, the record is not found.

Re:TIBStoredProc


Are you locating on a Char data type or a VarChar?  If it is a Char you will
need to space pad just like you would in SQL or set the TField for that column
to be FixedChar := false.

Quote
"K. H?cki" wrote:

> Hi

> to my question:

> It is not the TIBStoredProc the difference is the Locate-function
> from the TIBDataSet. With empty Option, the record is not found.

--
Jeff Overcash (TeamB)   I don't think there are any Russians
(Please do not email    And there ain't no Yanks
 me directly unless     Just corporate criminals
 asked.  Thank You)     Playing with tanks.  (Michael Been)

Re:TIBStoredProc


Jeff Overcash (TeamB) schrieb in Nachricht <3B6C6873.2DBF4...@onramp.net>...

Quote
>Are you locating on a Char data type or a VarChar?  If it is a Char you
will
>need to space pad just like you would in SQL or set the TField for that
column
>to be FixedChar := false.

It is of type VarChar and the FixedChar is false.

TLocateOptions Opts;
Opts.Clear();
Opts << loPartialKey;
Variant locvalues[2];
locvalues[0] = DM1->IBDataSet2->FieldByName("A_ID")->AsVariant;
locvalues[1] = Variant( DM1->IBStoredProc1->Params->Items[0]->Value );

DM1->IBDataSet1->Locate("A_ID;R_NR", VarArrayOf(locvalues, 1), Opts);

Need to put this: Opts << loPartialKey;
otherways it can not by found.

Re:TIBStoredProc


I just tested this and it had no problems locating with blank options.  I did
not have to put loPartialKey in the options to find things.

Quote
"K. H?cki" wrote:

> Jeff Overcash (TeamB) schrieb in Nachricht <3B6C6873.2DBF4...@onramp.net>...
> >Are you locating on a Char data type or a VarChar?  If it is a Char you
> will
> >need to space pad just like you would in SQL or set the TField for that
> column
> >to be FixedChar := false.

> It is of type VarChar and the FixedChar is false.

> TLocateOptions Opts;
> Opts.Clear();
> Opts << loPartialKey;
> Variant locvalues[2];
> locvalues[0] = DM1->IBDataSet2->FieldByName("A_ID")->AsVariant;
> locvalues[1] = Variant( DM1->IBStoredProc1->Params->Items[0]->Value );

> DM1->IBDataSet1->Locate("A_ID;R_NR", VarArrayOf(locvalues, 1), Opts);

> Need to put this: Opts << loPartialKey;
> otherways it can not by found.

--
Jeff Overcash (TeamB)   I don't think there are any Russians
(Please do not email    And there ain't no Yanks
 me directly unless     Just corporate criminals
 asked.  Thank You)     Playing with tanks.  (Michael Been)

Other Threads