Solved

Accessing db from C

Posted on 2000-04-22
1
200 Views
Last Modified: 2010-04-15
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
Comment
Question by:sa9813
1 Comment
 
LVL 1

Accepted Solution

by:
syscyk earned 100 total points
ID: 2743446
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand opening and reading files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand how to create, access, and change arrays in the C programming language.

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question