🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Copying TADOQuery query results into a TClientDataSet - RAD 2007, C++ Builder personality

#58
From: PaulR
Date: Mon, 26 Nov 2007 16:12
24 lines
1841 bytes
I have a TADOQuery whose query results I was trying to get into a 
TClientDataSet.

I know I can iterate through and Insert() / Post() into the client 
dataset, but I was trying to use the TClientDataSet::Data property.

I've tried making a TDataSetProvider, whose DataSet is the TADOQuery 
involved, then assigning the TDataSetProvider::Data to the 
TClientDataSet::Data property, but that doesn't appear to work.

That is, the TClientDataSet doesn't appear to have data in this after 
assigning it (First() sets EOF).  I can do a 
TDataSetProvider::DataSet->First(), and see I have data before the 
assignment, but the assignment itself doesn't appear to do anything.

I've tried making an intermediate TClientDataSet, and using 
SetProvider() to point to the TDataSetProvider involved, and assigning 
from TClientDataSet::Data to TClientDataSet::Data (again, after 
verifying the source has data), but again, no luck.

What am I doing wrong?

Thanks,
PaulR
Technical Details
Message-ID: <474af077$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10698b,17a16a538b7b67e3,start
X-Google-Attributes: gid10698b,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Mon, 26 Nov 2007 10:12:43 -0600
From: PaulR <nospam_prodden@commandalkon.com_nospam>
User-Agent: Thunderbird 2.0.0.6 (Windows/20070728)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.database.ado
Subject: Copying TADOQuery query results into a TClientDataSet - RAD 2007,
 C++ Builder personality
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 66.141.242.129
Message-ID: <474af077$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1196093559 66.141.242.129 (26 Nov 2007 08:12:39 -0700)
Lines: 24
Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail