🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.database.ado
1 messages
1 total messages Started by PaulR Mon, 26 Nov 2007 16:12
Copying TADOQuery query results into a TClientDataSet - RAD 2007, C++ Builder personality
#58
Author: 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
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads