Article View: borland.public.cppbuilder.database.ado
Article #4029Re: Master Detail datasets and server-side cursors
From: Vassiliev V.V.
Date: Mon, 22 Apr 2002 08:34
Date: Mon, 22 Apr 2002 08:34
52 lines
3425 bytes
3425 bytes
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:
<3cc3d216_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.online.be!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!hub1.nntpserver.com!telocity-west!TELOCITY!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!dnewsReferences:
<3cc2f644_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 02:15:37 PST From: "Vassiliev V.V." <news@vassilievvv.mtu-net.ru> Newsgroups: borland.public.cppbuilder.database.ado References: <3cc2f644_2@dnews> Subject: Re: Master Detail datasets and server-side cursors Date: Mon, 22 Apr 2002 12:34:30 +0400 Lines: 54 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: 62.118.131.19 Message-ID: <3cc3d216_2@dnews> X-Trace: dnews 1019466262 62.118.131.19 (22 Apr 2002 02:04:22 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!supernews.com!newsfeed.online.be!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!hub1.nntpserver.com!telocity-west!TELOCITY!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