C++ and Microsoft SQL Server

Started by
2 comments, last by CWizard 20 years, 11 months ago
I''m working on a project where I will need to fetch data from Microsoft SQL Server. Previously I have only worked with MySQL, and then using the MySQL++ API. While researching on how I should go about connecting to MS SQL Server, I discover a (percieved) djungle of ways to do it. There is DAO, ADO, DAC, ODBC, ABCDE, ADACDOADAODBCD... and whatnot that Microsoft suggest, and another thousand 3rd party wrappers and APIs out there. Too many choices can be bad. I don''t know exactly how ODBC works, but as I figure you use some "connector" that must be setup/installled previously. I''d like to avoid something like that, if possible. I don''t really feel motivated to read up on each and every API to determine which API is best, as I doubt not that almost all would do. I''ve seen some samples using some MFC class, but I will NOT convert my project to MFC. Is there a way to use those classes without MFC? So, my question is, what API is easiest to use? Also including if it enables me do implement it "cleanly" using C++. A quick outline on how to use said API would be appriciated, but not necessary.
Advertisement
*bump* or *dump*
I''ve been looking around for this type of thing myself, more out of curiosity than anything else. I believe that ADO is the current favourite. It stands for "ActiveX Data Objects" which hints at web applications. It''s COM based, which I''m not that well clued up on at the moment (so I''m currently looking into COM, amongst other things). It''s easy to access the ADO interfaces from VBA in MS Access, but that doesn''t really help with the C++ much. There''s also JScript interfaces, but you''d need to read the MSDN for more details.

Skizz
Yes, while reading the SDK docs, it seems like ADO is the best choice (from MS). The had very few C examples, though; most were VB. The C sample(s?) they showed looked aweful, and it didn''t show enough aspects of using ADO for me to for an opinion of it. I''ll go out to see if I can find more information about ADO outside MSDN.

More suggestions/tips are still welcome

This topic is closed to new replies.

Advertisement