How To Connecting and Use Database With C++?

tutorial about database with visual C++ 2008

Page 1 of 1

1 Replies - 7217 Views - Last Post: 06 October 2010 - 02:02 AM Rate Topic: -----

#1 visicod  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 05-October 10

How To Connecting and Use Database With C++?

Posted 05 October 2010 - 09:06 PM

I am using Visual C++ 2008 to create the desktop application with C++.but i don't know how to connecting and execute some database with C++.i am newbie in C++,before it i was a php programmer and can handle some database structure with MySQL.do you know how to using C++ with Microsoft Access or Microsoft SQL and coding it with C++?

any tutorial about using database with C++?
Is This A Good Question/Topic? 0
  • +

Replies To: How To Connecting and Use Database With C++?

#2 Banfa  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 83
  • View blog
  • Posts: 109
  • Joined: 07-June 10

Re: How To Connecting and Use Database With C++?

Posted 06 October 2010 - 02:02 AM

There are at least 2 ways to connect to most databases on Windows

  • Connection through a native propitiatory library. Most (many) database engines ship with a library of functyions that a C/C++ program can link to in order to use the database. I don't have much experience of this, but you would expect such a program to have a speed advantage because it uses native code but it would also be locked into 1 database engine.
  • ODBC - (Open DataBase Conectivity) this allows the user to set up a data source, the data source is not restricted to a particular database engine. The program then links to and makes calls to the ODBC API (OBDC reference) the ODBC lay makes the connection and provides a standardised SQL syntax for the user that it then interprets into the specific SQL dialect of the data source. The application is not locked to a single database engine but does have an extra layer of code so is likely to have a speed penalty.

Was This Post Helpful? 1
  • +
  • -

Page 1 of 1