@Albert Kallal , in the end... https://ransenstechstuff.blogspot.com/2021/10/automatically-creating-crecordset.html
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?
3 additional answers
Sort by: Most helpful
-
Albert Kallal 5,491 Reputation points
2021-10-04T15:32:47.337+00:00 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 -
Owen Ransen 541 Reputation points
2021-10-04T16:17:54.627+00:00 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...
-
Owen Ransen 541 Reputation points
2021-10-04T18:01:11.18+00:00 @Albert Kallal 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...