Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO dataset issues

Status
Not open for further replies.

deepsheep

Programmer
Sep 13, 2002
154
0
0
CA
I need to find a way to create ADO datasets without requiring them to be on the form.
I've got 2 on the form that I can use for most of my data access and they work well.

But I'm writing a recursive function that accesses the database, pulls a couple of records and then calls itself on each record until the 'right' one is found. If I keep using the same 2 datasets, it will cause alot of grief.
So I either need to
-make a NEW dataset everytime the function is called
OR -use an exisiting dataset, but stuff the data into something that is disconnected and NEW for each time the function is called.
OR - anything else that works :) (I've tries a few...)

It doesn't matter to me which, but I'll need code samples. (why can't I find code samples for this in help?)
I don't ususally work in C, so any help is appreciated
Thanks!
 
Off the top of my head, you may have to make a virtual dataset or create a NEW dataset for each iteration. The latter could be very messy if you call the recursion very many times or you forget to close each dataset.

I've never created a virtual dataset so I can't help here.


James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Do you have code on how to properly create a new dataset? I've tried every variation I can think of and I get a variety of errors.

I'll look into the virtural dataset, see if that leads me anywhere.

Thanks!
 
Nothing like answering your own question... The code for the next person...
TADODataSet *ADODataSetTemp;
ADODataSetTemp=new TADODataSet(NULL) ;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top