🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

TADODataSet and TADOTable

#175
From: TumurS
Date: Mon, 07 May 2007 03:57
26 lines
1954 bytes
In my previous project there was no problem with working TADOTable object.
Inserting, editing, removing and etc worked well. Cursor location and type
are client and static. Auto-increment fields values retrieved correctly by 
engine
after inserting new record operation.
I dont' remember why I choosed TADODataSet for another project, but
now I encountered some problem. CommandType is cmdTable and cursor's
location/type are same as above. After inserting a new record it's 
auto-increment key field
has 0 value. I cannot do any further operation on it because the key is 
wrong.
So I added this line just after opening dataset:

    (*dataset->Properties)[OleVariant(WideString("Update Resync"))]->Value = 
adResyncAll;

(by the way, to refer to above constant I manually included <adodb_xp.h>. is 
it safe?)

Now the new record disappears from local cache just after posting.  Any 
ideas?
Also, if my code retrieving all records from the server (i.e. no WHERE), is 
there
any difference between using table and query?

P.S. MSSQL2K and BCB6
Technical Details
Message-ID: <463ea372$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,8ae4fe352a0e2720,start
X-Google-Attributes: gid10698b,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "TumurS" <spam_tumurbaatar@pixel.mn>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: TADODataSet and TADOTable
Date: Mon, 7 May 2007 11:57:24 +0800
Lines: 28
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 202.55.183.101
Message-ID: <463ea372$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1178510194 202.55.183.101 (6 May 2007 20:56:34 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail