
VC++ 6.0, MSSQL Server 7.0, ADO >Sample<
There are typically 2 ways...
1. #import the ado type library.
2. #include the sdk headers.
The first one allows you to use the C++ smart pointers and exception
handling. This would make a good candidate for MFC applications.
The second one is basic interface pointers with no exception handling. This
would be good for ATL components that need to be compact.
Really, you could use either option with MFC or ATL. It may just be a
matter of skill and personal preference. I decided to go down the #include
route because I do a lot of ATL programming. Although it is server based
programming (where size is not such a big issue), I still can't break the
habit of lean-and-mean COM components. ;-)
The knowledge base discusses how to set up ADO in VC++ for either option.
But I will tell you right know, even with help it took me quite a while to
figure it out.
Be sure to scan the knowledge base at MS and feel free to ask more
questions.
Quote:
>Has anybody a very small, very simple
>Example to show me how it works in principle?
>Thanx,
>Berni