Subject Re: [IBO] Problem in binding cursor?
Author Hans
Knew u wud come to the rescue :)

----- Original Message -----
From: "Helen Borrie" <helebor@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, September 10, 2004 11:30 PM
Subject: Re: [IBO] Problem in binding cursor?


> At 08:56 PM 10/09/2004 +0000, you wrote:
>
> >Hi All,
> >
> >I'm using a TIBOQuery's DeleteSQL property to delete a record and
> >getting the error "Problem in BindingCursor". The systax of the
> >DeleteSQL is
> >
> >execute procedure spUpdateMajorSetup
> >(:MajorID, :MajorName, :GroupID, 'Y');
> >
> >where it's calling a stored procedure. The stored procedure works
> >fine in IBExpert.
> >
> >The SQL statement for the query is
> >
> >select ma.MajorID, ma.MajorName, ma.GroupID, gr.GroupName
> >from xMajor ma
> >join xGroup gr on gr.GroupID = ma.GroupID
> >where ma.MajorID = :MajorID
> >
> >My KeyLinks is set to xMajor.MajorID which is the primary key of the
> >xMajor table.
> >
> >The strange thing is that I'm using essentially the same type of
> >process with another query object and a different (but similar)
> >stored procedure in another part of the program and it works fine.
> >
> >What am I missing?
>
> The Keylinks here have to be enough to uniquely identify each row in the
> set. MajorID is not enough, since multiple rows will potentially have the
> same MajorID. Adding GroupID is not enough either, since GroupID is
> apparently not unique in the xMajor table, giving rise to mulitple output
> rows having the same MajorID + GroupID. So include the PK of the xGroup
> table in the query output and add it to the Keylinks as well; and include
> it as an input parameter for the InsertSQL. Unless there is more that
> you're not telling, that should be sufficient to uniquely identify the
rows
> that the DeleteSQL's parameters will target.
>
> Note, you don't have to display xGroup's PK - you can set its Visiible
> ColumnAttribute to False.
>
> Helen
>
>
>
>
>
___________________________________________________________________________
> 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
>
>
>
>
>