Subject | Re: [IBO] Error with parameters |
---|---|
Author | Estevão Giordani |
Post date | 2011-11-08T11:24:49Z |
TIB_Connection, sorry.
After update, I made the test with two different projects.
One works fine, but the other shows an access violation in any Form that uses TIB_Query.
Looking better, the project that has a TIB_Transaction assigned to
the TIB_Connection, works.
So, I made a simple test: A form with a TIB_Connection and a TIB_Query.
No problem opening a simple query like "select * from table".
But using parameters (select * from table when id = :pID), an access
violation occurs on:
query.Prepare; //or
query.ParamByName( 'pID' ).AsInteger := 10;
Just put a TIB_Transaction in the Form and assign to the
TIB_Connection to fix the problem.
Estevão.
After update, I made the test with two different projects.
One works fine, but the other shows an access violation in any Form that uses TIB_Query.
Looking better, the project that has a TIB_Transaction assigned to
the TIB_Connection, works.
So, I made a simple test: A form with a TIB_Connection and a TIB_Query.
No problem opening a simple query like "select * from table".
But using parameters (select * from table when id = :pID), an access
violation occurs on:
query.Prepare; //or
query.ParamByName( 'pID' ).AsInteger := 10;
Just put a TIB_Transaction in the Form and assign to the
TIB_Connection to fix the problem.
>> Now, all is working fineYes. Works only with TIB_Transaction assigned.
> You mean when you assign a TIB_Transaction?
Estevão.
>
> Estevão,
>> After update to IBO (4.9.14.22), a TIBO_Connection must have a
>> TIB_Transaction.
> TIBO_Connection?
> Please give a more accurate problem report.
>> Without this, every Query.Prepare or ParamByName causes an Access
>> Violation.
>> Don´t was like this before, am I right?
> You could be right.
> Perhaps the quick fix I did had an unexpected problem.
>> Now, all is working fine
> You mean when you assign a TIB_Transaction?
> Jason