help with nested datasets and MSSql Server autoincrement, ado and D6

From: Rafel Coyle (rafel.coyle_at_pfshouston.com)
Date: 04/28/04


Date: Tue, 27 Apr 2004 17:29:15 -0500

This is an old problem that occurs with D6 and ADO with autoincrement

fields and nested datasets. I have asked this question on a couple of
occasions and yet to receive a clean answer. If you don't know how to
help resolve this problem please don't offer a "possible" solution.

I have two tables that are nested using tquery components with
corresponding clientdatasets. It has been document in several articles
by Dan Miser "using midas as a replacement for the BDE" that when using
autoincrement fields you can replace the key field values using
sequential negative numbers and updating the permanent foreign key
values in the provider interface for the child tables as necessary to
keep the child data synchronized. This works well with non ADO datasets
in D6. This technique does not work in D6 when using ADO components. I
have further noted and tried some suggestions that include replacing the
autoincrement fields by manually creating and making them not read only.
 It seems like this would work, however although I make the created
fields not read only I get an error message indicating that I am
attempting to change the value of the identity column. I don't want to
change the data in the column in the database. I need the change to be
temporary and let the server update column as normal so that I can tget
the value and update the child records.

If anyone can shed some light as to how to best do this in this
environment I would really appreciate it.



Relevant Pages

  • Connecting D6 to SQL7 using ADO and Data Providers
    ... This is an old problem that occurs with D6 and ADO with autoincrement ... fields and nested datasets. ... keep the child data synchronized. ...
    (borland.public.delphi.database.ado)
  • Re: Kopie Access2SQL per ADO
    ... >> Wenn ich AutoIncrement nutze sagt er das es ein Objekt mit dem Namen ... ADO kennt aber garkein Column-Objekt. ... ADO.NET kennt es, habe aber leider nur ADO + VC++. ... Mfg Baumgart ...
    (microsoft.public.de.vc)
  • Re: ADO concept in VB
    ... Chris Hanscom - Microsoft MVP ... Veign's Resource Center ... "autoincrement in ADO using text box" <autoincrement in ADO using text ...
    (microsoft.public.vb.database.ado)