🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #4032

Re: Master Detail datasets and server-side cursors

#4032
From: Tony
Date: Mon, 22 Apr 2002 20:18
76 lines
4172 bytes
Thanks for your repley. The provider I am using is SQLOLEDB. I still have
questions about this because other people do not seem to have any problems
with master-detail relationships. Look at Brian Bushay's answer to the same
quesion under delphi.ado group. He says he can't even duplicate the problem.
Also I  don't have any problems with the master detail relationship other
than getting the correct master autoinc field to populate a new detail
record FK field. All other operations (selects, updates) seem to work OK. Do
you know of any documentation on this?


"Vassiliev V.V." <news@vassilievvv.mtu-net.ru> wrote in message
news:3cc3d216_2@dnews...
> Master-details relationship in ADO is supported by MS Shape provider. It
> works with other providers and requires client-side cursor. Most (if not
> all) other providers do not support master-detail. Sorting and filtering
is
> not supported by most providers too. So, the only one way to use
> master-detail is to do it manually - open a master dataset and, every time
> you move requery your detail dataset.
>
> Regards,
> Vassiliev V.V.
> http://www.oledbdirect.com
>
> "Tony" <hse@hill-soft.com> �������/�������� � �������� ���������:
> news:3cc2f644_2@dnews...
> > Borland Builder 5
> > MS-SQL
> > ADO Express
> >
> > Can anyone tell me how to use a server cursor location in a master
detail
> > table relationship?
> >
> > I have an application with a master table I will call Master and a
detail
> > table I will call Detail. The Detail table DataSource property is set to
> > Master. Detail.MasterID= Master.ID. The application works fine as long
as
> I
> > use client-side cursors. I need to change the detail table to server
side
> > cursors because it will contain many (500,000 +) records and I do not
want
> > to load these records into memory.
> >
> >  I changed the Detail dataset cursor location to server and cursor type
to
> > keyset. This caused the error "Current provider does not support
necessary
> > interface for sorting or filtering" when the table is opened because the
> > IndexFieldNames property of the dataset cannot be used with a server
> cursor
> > location and this property is used in a detail table dataset to
reference
> > the master table. In this case Master.ID
> >
> > I tried changing the detail dataset to a query from a table as follows.
> > Select * From Detail Where MasterID = :ID. The Detail table datasource
> > remains set to the Master table. This allowed the Detail table open
> without
> > errors but when adding a Detail record in a form using TDBNavigator the
> > Detail.MasterID is no longer set to the Master.ID and remains NULL. This
> > relationship (Detail.MasterID = Master.ID) was maintained automatically
> when
> > the cursor location was set to Client.
> >
> > I tried setting the Detail.MasterID field manually in the BeforePost
event
> > but got the error "Multiple step OLE DB operation generated errors ...".
> >
> > Thanks in advance for any advice on how to solve this problem.
> >
> >
>
>
Technical Details
Message-ID: <3cc46f57$1_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!peer1-sjc1.usenetserver.com!usenetserver.com!hub1.nntpserver.com!xmission!news-out.spamkiller.net!propagator2-maxim!propagator-maxim!news-in.spamkiller.net!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <3cc2f644_2@dnews> <3cc3d216_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10698b,c4baa2abb07efafd
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-04-22 13:23:51 PST
From: "Tony" <hse@hill-soft.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3cc2f644_2@dnews> <3cc3d216_2@dnews>
Subject: Re: Master Detail datasets and server-side cursors
Date: Mon, 22 Apr 2002 16:18:25 -0400
Lines: 78
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2600.0000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 65.59.32.240
Message-ID: <3cc46f57$1_1@dnews>
X-Trace: dnews 1019506519 65.59.32.240 (22 Apr 2002 13:15:19 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!peer1-sjc1.usenetserver.com!usenetserver.com!hub1.nntpserver.com!xmission!news-out.spamkiller.net!propagator2-maxim!propagator-maxim!news-in.spamkiller.net!news02.tsnz.net!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews