• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

Accessing db from C

Can somebody please point me in the right direction. What I want to know is how to connect to a db, an MS Access for example. And ofcourse how to query the db. I'm using plain C.
0
sa9813
Asked:
sa9813
1 Solution
 
syscykCommented:
You have a couple of options here, sa9813.
  You can use ODBC (Open DataBase Connect) to get to the database,  you can use embedded SQL (if your database supports it), or you can use the proprietary API that the database vendor gives you.  With Oracle, for instance, you get Pro C, or the ORACLE OCI.  The benefit of ODBC is that it is portable between databases. The downside is that it is slow, and only the most basic SQL stuff is supported.  I would suggest using the API supplied by the database vendor, that is ususally the best in terms of performance.  And when you are using a relational database, you need all the performance you can get, and then some.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now