Article View: borland.public.cppbuilder.database.ado
Article #4334Re: How to add an extra column to an opened TADODataSet?
From: Joe Smith
Date: Wed, 13 Feb 2002 00:53
Date: Wed, 13 Feb 2002 00:53
28 lines
1890 bytes
1890 bytes
There is absolutely no way to add a field to an open dataset (ado dataset or client dataset). And you can't select back a dummy field either, because it won't be editable unless it comes from an actual field in the table. The only way I could think of, would be to create an additional dataset, with 2 fields: a unique id which corresponds to an id field in you're original dataset, and the new field. Then you could set up a master detail relationship, so that whatever record you're on in the original dataset, the new dataset would be on the matching record. Hope this helps. "xu ying" <s142857@21cn.com> wrote in message news:3c65ea8c$1_1@dnews... > > TADODataSet * dsSelect; > ..... > dsSelect->CommandText = "SELECT column1, column2 FROM TABLE1"; > dsSelect->Open(); > > file://now I need to add the extra column3 into dsSelect. > file://column3 is not incluted in TABLE1. > file://How to do that? > > file://���� > file://THEN: > > dsSelect->Close(); >
Technical Details
Message-ID:
<3c69b921$1_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news-x2.support.nl!newsgate.cistron.nl!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnewsReferences:
<3c65ea8c$1_1@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 10698b,ae21e695ce536f9f X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-02-12 17:11:55 PST From: "Joe Smith" <Jchapman@cenadex.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3c65ea8c$1_1@dnews> Subject: Re: How to add an extra column to an opened TADODataSet? Date: Tue, 12 Feb 2002 16:53:51 -0800 Lines: 30 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 NNTP-Posting-Host: 24.81.8.191 Message-ID: <3c69b921$1_1@dnews> X-Trace: dnews 1013561633 24.81.8.191 (12 Feb 2002 16:53:53 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news-x2.support.nl!newsgate.cistron.nl!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!dnews