Article View: borland.public.cppbuilder.database.ado
Article #4928batch update doesn't work with TDBGrid and something about master/detail
From: Alex
Date: Fri, 31 Aug 2001 10:30
Date: Fri, 31 Aug 2001 10:30
18 lines
1750 bytes
1750 bytes
I have two tables with master/detail relationship. master table have a PK that is not auto-increase and detail has a PK that is auto-increased and a FK to master table. I implement that by two TADOQuerys, and set the detail query to batchupdates so that to insert detail rows after master row. I've done everything that online help emphasize, but when I insert detail rows the detail Grid doesn't display these rows. But when i watch detail->RecordCount it's correct. It works well when using BDE's cacheupdates, but ADO's batchupdates. My question is: 1.Is batchupdates only doing update but insert? 2.In application we often deal with master/detail such as Orders. In BCB TDBGrid auto post changes when cursor moves, in my solution the master PK haven't been inserted so I must cache inserted detail rows up. Do I miss something to do that easily? I don't think Pre-Insert is better. thanks.
Technical Details
Message-ID:
<7dda35b.0108310230.1da4eb1f@posting.google.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,3e79bc3d28694dcd,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-08-31 03:30:28 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail From: internal@fm365.com (Alex) Newsgroups: borland.public.cppbuilder.database.ado Subject: batch update doesn't work with TDBGrid and something about master/detail Date: 31 Aug 2001 03:30:28 -0700 Organization: http://groups.google.com/ Lines: 18 Message-ID: <7dda35b.0108310230.1da4eb1f@posting.google.com> NNTP-Posting-Host: 211.167.224.49 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 999253828 10555 127.0.0.1 (31 Aug 2001 10:30:28 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 31 Aug 2001 10:30:28 GMT