Thread: New to VC++

  1. #1
    Registered User Mindcrime's Avatar
    Join Date
    May 2003
    Posts
    1

    New to VC++

    I am new to visual C++, but an old hat at VB6.

    Is it possible to use ADO in VC++ and if so..how?

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    It is, by using COM. But I would advise against it.

    First, COM is an advanced topic and you need to know a good deal about C++ before you can approach it.

    Second, ADO was designed for languages supporting Automation and is tiresome to use from C++ because of the various VARIANTs you come across all the time.

    Third, nearly all ADO documentation was written from the viewpoint of the Automation client. In VB it might be easy:
    myvar = myobj(3);
    but in C++ the same is quite complicated, with the need for decoding VARIANTs and SAFEARRAYs and such. This difference is not accounted for in the documentation.

    Fourth, COM pointers are constantly retrieved in ADO. Simply releasing every single one again is very tiresome. Not to mention the loads of error handling that VB does all for you.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to show line no in VC ++
    By mpushkar in forum Tech Board
    Replies: 1
    Last Post: 12-17-2006, 09:33 AM
  2. makefile exported by vc 6.0 doesn't work
    By wow in forum Windows Programming
    Replies: 7
    Last Post: 03-24-2006, 04:20 PM
  3. Can't compile this with VC 6.0
    By uriel2013 in forum C++ Programming
    Replies: 4
    Last Post: 05-31-2003, 07:43 PM
  4. VC 7.0 and templates
    By Mongush in forum C++ Programming
    Replies: 12
    Last Post: 03-11-2003, 10:32 AM
  5. Why VC?
    By Unregistered in forum Windows Programming
    Replies: 1
    Last Post: 04-15-2002, 05:24 AM