question

OwenRansen-2591 avatar image
0 Votes"
OwenRansen-2591 asked OwenRansen-2591 answered

An MFC wizard for making CRecordset derived classes from MDB files?

I have a vague reccollecton of an MFC wizard for making CRecordset derived C++ classes from MDB files?

Does one still exist, if so where? Or do I have to do it all by hand?

TIA,

Owen

PS: This new forum system is hopeless. There is no Cpp tag, no Access tag, no MFC tag. What's a man to do?

office-access-dev
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OwenRansen-2591 avatar image
0 Votes"
OwenRansen-2591 answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

AlbertKallal-4360 avatar image
0 Votes"
AlbertKallal-4360 answered

Well, at least we got a access dev tag!!! ;-)

Anyway, I don't recall such a tool. One could use .net, and say use the dataset designer, as it cranks out c# (or vb.net classes). The dataset designer in .net is really much the same as entity framework - (but just a early version of such a concept).

So, I suppose you could take, grab, use the c# classes and perhaps convert them to c++?

but, in my travels around the access land? I don't recall such a tool. Perhaps there is some tool that would take any say ODBC data source and generate the classes for you? I never really did any c/c++ work. But, I am rather fluent in c# and of course vb.net.

I mean, if one was really in for some hand stands? You could use .net to create the class(s), and the consume the .net code from c++, but then again, we kind of defeating the use of c++ in the first place?

So, sorry I don't have better advice, but I would consider firing up VS, create a c# winforms desktop project, and then try creating a dataset (use the dataset designer).

Now go grab the c# class(s) generated for you - they might be of use in this case. However, if the tables in that database under go much change, then this might be too much extra work to maintain such a setup (but, for a "one time" generate of the table classes, this may well be a workable idea).

Regards,
Albert D. Kallal (Access MVP 2003-2017)
Edmonton, Alberta Canada

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

OwenRansen-2591 avatar image
0 Votes"
OwenRansen-2591 answered AlbertKallal-4360 commented

Thanks for the suggestions, but there definitely used to be a tool....

I think I'll make my own in C# which writes C++ if I can't find the old one...

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Well, I do think that VS datasets can be used with c++, so try/check out that first!
If c++ can use datasets (I think it can, then it will generate the classes for you). So before you go down the c# road, check if c++ supports the older dataset designer. I just don't know this answer, but if it does, then you can get VS to generate the classes for you.

0 Votes 0 ·
OwenRansen-2591 avatar image
0 Votes"
OwenRansen-2591 answered AlbertKallal-4360 commented

@AlbertKallal-4360 said: "VS datasets can be used with c++,"

Ah. I don't even know what VS datasets are. I've googled them, but it seems a lot of work...

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Its not too bad.
Try making a new desktop (winforms) in c#.

Then create/add a dataset. you can then just drag + drop all the access tables into that one dataset designer.
Save it - it generates the c# classes for you. (now, if you never used a dataset in winforms (c#, or vb.net), then yes, its a learning curve. Once you done one, they are very easy to make - but like anything? I accept the first time is a learning curve.

0 Votes 0 ·