🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to add an extra column to an opened TADODataSet?

#4332
From: Big Stew
Date: Tue, 12 Feb 2002 09:42
24 lines
1521 bytes
Anyway, you can't do this using a TADODataSet, you need to use a TADOQuery
instead,

ADOQ->Close() ;
ADOQ->SQL->Clear() ;
ADOQ->SQL->Add("ALTER TABLE TABLE1 ADD column3 INT") ;
ADOQ->ExecSQL() ;

"xu ying" <s142857@21cn.com> wrote in message news:3c65ea8c$1_1@dnews...
>
> TADODataSet * dsSelect;
> .....
> dsSelect->CommandText = "SELECT column1, column2 FROM TABLE1";
> dsSelect->Open();
>
> //now I need to add the extra column3 into dsSelect.
> //column3 is not incluted in TABLE1.
> //How to do that?
>
> //����
> //THEN:
>
> dsSelect->Close();
>
Technical Details
Message-ID: <3c68e3d7$1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!128.230.129.106!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews
References: <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 01:48:16 PST
From: "Big Stew" <Big_Stew@talk21.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 09:42:47 -0000
Lines: 26
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: 212.19.90.97
Message-ID: <3c68e3d7$1_2@dnews>
X-Trace: dnews 1013507031 212.19.90.97 (12 Feb 2002 01:43:51 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!128.230.129.106!news.maxwell.syr.edu!out.nntp.be!propagator-SanJose!in.nntp.be!newsfeed01.tsnz.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews