Subject | Re: [IBO] Re: Working with IB_Cursors and params = error |
---|---|
Author | Marcin Bury |
Post date | 2011-12-16T11:00:24Z |
Patrick
W dniu 16.12.2011 11:54, patrick_marten pisze:
try to prepare...
Marcin
W dniu 16.12.2011 11:54, patrick_marten pisze:
> Hi Daniel,Try to remove the semicolon ';' from the end of the statement and then
>
> --- In IBObjects@yahoogroups.com, Daniel Rail<daniel@...> wrote:
>>
>> Hi,
>>
>> At December-15-11, 11:01 AM, patrick_marten wrote:
>>
>>> Is the bugtracker being used?
>>
>>> Just found out that someone has posted about an issue, which sounds
>>> very similar. According to the poster, though, it was already the
>>> case with previous releases i.e. before 28c, can't say for sure now.
>>
>>> However: there is even a samlpe attached. Haven't try it out yet though.
>>
>>> Maybe this will help already, otherwise I will try to describe the
>>> cases I have, which is probably not easy since it works in other cases...
>>
>> Can you show the query that you are using in that particular
>> IB_Cursor? Also, do you have a Prepare before the ParamByName? As I
>> remember that Jason added code to Prepare the query, if it is not,
>> when calling ParamByName.
>>
>> The error that you posted is generated by the server, not IBO(unless
>> it is something added to the query by IBO).
>
> There is nothing special in the query in that cursor:
>
> CursorValues.SQL.Add('select ID, VALUE from MY_TABLE where (ID = :ID);');
> CursorValues.ParamByName('ID').AsInteger := myIDParam;<- here the error occurs
>
> The cursor is not prepared.
>
> Just tried to call Cursor.Prepare prior to Cursor.ParamByName and the error occurs in Cursor.Prepare then.
try to prepare...
Marcin