Subject | Re: [IBO] Error with parameters |
---|---|
Author | Andrei Luís |
Post date | 2011-11-07T16:03:24Z |
Hi Jason, I'm glad to being usefull to you.
The app I made to test is quite simple:
- Create a new project
- Drop a TIB_Connection point it to a fdb file
- Drop a TButton, here is the code I use in the onClick event:
procedure TForm1.Button1Click(Sender: TObject);
Var qry_tmp : TIB_Query;
Begin
qry_tmp := TIB_query.Create(Self);
qry_tmp.DatabaseName := IB_Connection1.DatabaseName;
qry_tmp.SQL.Text := 'select * from rdb$database where
rdb$relation_id=:wRelation_id'; // I know this select is useless,
this is just for test proposes,
// the
error that occurs using my original select is the same
qry_tmp.ParamByName('wRelation_id').asInteger := 5;
qry_tmp.Open;
ShowMessage('No error');
end;
[]s
Andrei
2011/11/7 Support List <supportlist@...>:
The app I made to test is quite simple:
- Create a new project
- Drop a TIB_Connection point it to a fdb file
- Drop a TButton, here is the code I use in the onClick event:
procedure TForm1.Button1Click(Sender: TObject);
Var qry_tmp : TIB_Query;
Begin
qry_tmp := TIB_query.Create(Self);
qry_tmp.DatabaseName := IB_Connection1.DatabaseName;
qry_tmp.SQL.Text := 'select * from rdb$database where
rdb$relation_id=:wRelation_id'; // I know this select is useless,
this is just for test proposes,
// the
error that occurs using my original select is the same
qry_tmp.ParamByName('wRelation_id').asInteger := 5;
qry_tmp.Open;
ShowMessage('No error');
end;
[]s
Andrei
2011/11/7 Support List <supportlist@...>:
> Andrei,
>
> Hmmm... That probably was enough.
>
> How about you send me a simple sample app so I can give it a go with
> something that you confirm exhibits the problem.
>
> Jason
>
>> -----Original Message-----
>> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On
>> Behalf Of Andrei Luís
>> Sent: Monday, November 07, 2011 5:33 AM
>> To: IBObjects@yahoogroups.com
>> Subject: Re: [IBO] Error with parameters
>>
>> Hi Jason, didn't work.
>>
>> Do I need to recompile IBO? I just did a "build all" with my project
>> opened, is this enough?
>>
>> []s
>> Andrei
>>
>>
>>
>> 2011/11/6 Support List <supportlist@...>:
>> > Andrei,
>> >
>> > Go into the file IBA_Row.imp and look for this method and make it like
>> this
>> > one:
>> >
>> > function TIB_Row.GetColumns( Index: word ): TIB_Column;
>> > begin
>> > if not Statement.Prepared then // Added this line.
>> > Statement.Prepare; // Added this line.
>> > if Index < FColumnList.Count then
>> > Result := FColumnList.Items[ Index ]
>> > else
>> > Result := nil;
>> > end;
>> >
>> > Let me know if this works for you.
>> >
>> > Thanks,
>> > Jason LeRoy Wharton
>> > www.ibobjects.com
>
>
>
>
> ------------------------------------
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more ! Yahoo! Groups Links
>
>
>
>