🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Master Detail datasets and server-side cursors

#4026
From: Tony
Date: Sun, 21 Apr 2002 17:29
33 lines
2500 bytes
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: <3cc2f644_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!skynet.be!skynet.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,c4baa2abb07efafd,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2002-04-21 10:27:44 PST
From: "Tony" <hse@hill-soft.com>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Master Detail datasets and server-side cursors
Date: Sun, 21 Apr 2002 13:29:19 -0400
Lines: 35
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: 63.212.148.74
Message-ID: <3cc2f644_2@dnews>
X-Trace: dnews 1019409988 63.212.148.74 (21 Apr 2002 10:26:28 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!skynet.be!skynet.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews