VC++ DB Project

This is a discussion on VC++ DB Project within the C++ Programming forums, part of the General Programming Boards category; Hi, I just start to learn VC++ 6 and confuse about some terms regarding the DB. COM OLEDB ADO DAO ...

  1. #1
    Registered User
    Join Date
    Oct 2001
    Posts
    81

    Question VC++ DB Project

    Hi,

    I just start to learn VC++ 6 and confuse about some terms regarding the DB.

    COM
    OLEDB
    ADO
    DAO
    ODBC

    I used ODBC driver to connect Access DB previously.

    May I ask do most of current program use ADO to do DB connection?

    Which one should I use in above technologies (in what situation)?

    Thanks for help.

    gogo


  2. #2
    Evil Member
    Join Date
    Jan 2002
    Posts
    638
    I'd recommend looking into SQL for your database work, unless you have existing code to the contrary. In almost all cases its a matter of whats already there, even including oracle and even *shudder* COBOL just because of the staggering costs of a rewrite.

    But if its up to you, I'd look into SQL, its got bindings, its portable, and its free.

  3. #3
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789

    Re: VC++ DB Project

    Originally posted by gogo
    Hi,

    I just start to learn VC++ 6 and confuse about some terms regarding the DB.

    COM
    OLEDB
    ADO
    DAO
    ODBC

    I used ODBC driver to connect Access DB previously.

    May I ask do most of current program use ADO to do DB connection?

    Which one should I use in above technologies (in what situation)?

    Thanks for help.

    gogo

    COM isnt just a database technology......its basically a way to use C++ classes in other languages such as VB and J++ (That's probably the most basic description ever - you do some reading to get more info).

    ODBC is a database driver system that allows you to access a relational database with the ODBC API functions....you need the specific ODBC driver installed on the system to allow your prog to talk to the database

    DAO is a COM object model that allows you to work with ODBC databases.

    OLEDB is a COM database model that doesnt need ODBC, relational databases and can work with many more datasources that normal databases.....its hard to use though

    ADO is an object model built on OLEDB and simplifies it.......it is very powerful, versitile and easy to use........it is also accessible as ActiveX components and so can be used not only in C++ & VB, but in JScript and VBScript

    Of all the models, I would (and I am as I am learning it now) going with ADO......

    One word of caution......if you want to do this in C++, take a month or so to get happy with working in COM via C++....its pretty difficult and you need to understand almost EVERYTHING that goes on......books on ADO wont help as they are almost all in VB...and that language shields you from the ugly aspects of COM....

    Also you have VC++ which is good......it may not be my favorite compiler any more......but for COM in C++, it has no competition

  4. #4
    Registered User
    Join Date
    Oct 2001
    Posts
    81
    Could you recommend some good books for COM?

  5. #5
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,789
    Originally posted by gogo
    Could you recommend some good books for COM?
    Most of what I know comes from many different sources (MSDN, CodeProject,CodeGuru....)...but if I were to point to 2 books that I still refer to...then Inside ATL and Windows Programming with MFC ( the latter inst really a com book, but it offers a whole section on COM & ActiveX)

    As to ADO (should yo follow that path) then ADO-AciveX Data Objects published by OReilly is a good book

  6. #6
    Registered User
    Join Date
    Nov 2003
    Posts
    4

    Angry

    Hi,

    I got the same problem here,

    I use to use a object in vb: data1.data. This object maked a
    connection to a database that i have maked with the visual data
    manager.

    Is there a new object in Visual Studio.Net to do the same, that i
    do not now about ?

    Sorry for the englisch.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem Displaying a Struct
    By rockstarpirate in forum C++ Programming
    Replies: 16
    Last Post: 05-05-2008, 10:05 AM
  2. Replies: 10
    Last Post: 05-19-2006, 12:23 AM
  3. Game Independent Anti-cheat Project Needs Programmers
    By GIA Project Lea in forum Projects and Job Recruitment
    Replies: 3
    Last Post: 09-15-2005, 08:41 PM
  4. if is faster than switch?
    By skorman00 in forum C++ Programming
    Replies: 32
    Last Post: 03-06-2004, 01:15 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21