Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Index out of range

147 views
Skip to first unread message

Frederic Gelinas

unread,
Feb 5, 2003, 11:57:55 AM2/5/03
to
I'm trying to set up a Master-Detail relationship with a TClientDataSet. I
want to fetch all the detail data from the Interbase database (the table is
small) and then let the application show detail records faster than having
to fetch on every master record change.

When I open the detail dataset, I get: EIBClientError 'XSQLDA index out of
range'.

The ClientDataSet is linked to a TIBQuery that execute a simple Select
field1,field2 from Table1.
When I connect the DataSetProvider to something else that the
IBQuery(TTable), it works well.

I think that the ClientDataSet tries to set an index on the IBQuery.


Using Delphi 5 Enterprise, I have IBX version 5.04.

Any idea?

--
Fred.


Frederic Gelinas

unread,
Feb 5, 2003, 11:59:58 AM2/5/03
to
Connecting with an IBTable works well. I don't want to use an IBTable
because in the future, I will probably need a query with a Where clause...

"Frederic Gelinas" <frederic...@hotmail.com> a écrit dans le message de
news: 3e41...@newsgroups.borland.com...

Bill Todd

unread,
Feb 5, 2003, 2:38:29 PM2/5/03
to
Use a nested dataset for the detail and you will get what you want.


--
Bill (TeamB)
(TeamB cannot respond to questions received via email)

Frederic Gelinas

unread,
Feb 5, 2003, 3:09:42 PM2/5/03
to
What if the master Dataset isn't a ClientDataSet?
I know I can add a Provider and a ClientDataSet, but this is not the point.
Currently, the master Dataset is a plain TTable linked to a DBase Table. I
don't want to rewrite the whole application at this point.

Any other hints?

"Bill Todd" <bi...@notthis.dbginc.com> a écrit dans le message de news:
r0q24vktgn3fojs4a...@4ax.com...

Frederic Gelinas

unread,
Feb 6, 2003, 10:09:49 AM2/6/03
to
It makes me smile... I realize that my messages weren't so clear...
I'm working on a Desktop app that is using DBase and Paradox files (don't
ask me why).
My job consist of converting it to Interbase. My strategie is to convert
the application table by table.
To do so, I create the table in the InterBase database, delete the TTable
and replace it with a IBTransaction+IBQuery+DataSetProvider+ClientDataset.

Using this strategy worked well until I tried to convert a TTable that was a
detail of another TTable.
That is why I'm talking about some BDE stuff in the InterbaseExpress NG.
The problem I have has nothing to do with the BDE. The problem is when I
try to set the MasterSource of a ClientDataSet that is linked to a TIBQuery.
When doing this, I get the Index out of Range message (This is an IBX
error). When using a TIBTable or a TIBDataSet, it works perfectly.

I don't want to use an IBTable and don't need all the overhead of the
IBDataSet. I want to use an IBQuery.

I hope this makes my problem clearer.


"Bill Todd" <bi...@notthis.dbginc.com> wrote in message
news:5vv24vcql631g3gb1...@4ax.com...
> If you are using dBase tables and the BDE you are posting in the wrong
> newsgroup. This group is for the InterBase Express components. Your
> messages are also very confusing. In your first message you said, "I'm


> trying to set up a Master-Detail relationship with a TClientDataSet."

> Now you are saying, "the master Dataset is a plain TTable linked to a
> DBase Table".
>
> Please post a clear explaination of what components you are using,
> what database you are using, how the components are connected, what
> you are trying to do and what is not working, including any error
> messages, and post it in the correct newsgroup.

Bill Todd

unread,
Feb 6, 2003, 11:31:42 AM2/6/03
to
The best way to solve the problem is to convert the master table at
the same time and use a nested dataset field to hold the detail
records.

If you don't want to do that you will have to create an index on
foreign key field in the detail ClientDataSet. That should work,
although I have never tried it.

I don't know exactly what is causing the error you see. Perhaps Jeff
will know.

Frederic Gelinas

unread,
Feb 6, 2003, 12:29:23 PM2/6/03
to
> If you don't want to do that you will have to create an index on
> foreign key field in the detail ClientDataSet. That should work,
> although I have never tried it.
>
> I don't know exactly what is causing the error you see. Perhaps Jeff
> will know.

I already created the index in the ClientDataSet. The problem is not at the
ClientDataSet level, because with an IBDataSet, it works well. Presently, I
put an IBDataSet instead of an IBQuery.

I'm just wondering why it is behaving like that.

Yes, perhaps great Jeff will know.

Fred.


0 new messages