jumbojs
jumbojs

Reputation: 4868

Programming against a database in C

I want to program against various databases in C. I want to know if all of the major database providers, Oracle, DB2, Sql Server, MySql have an api to use for C. If they all do can you give me some links to what the are but more specifically, how to work with the api?

thanks

Upvotes: 1

Views: 405

Answers (2)

Victor
Victor

Reputation: 1703

You can use ODBC. But thats not a good idea, cause of the performance impact it may have on your application.

The answer to your question is yes. All major databases provide some api of their own for you to communicate directly with your database.

The only problem with your question is that you forgot to tell which operating system you will be developing for. The only api i remember right now for those majors databases is libpq (for PostgreSQL). Usually in the developer's website its possible to find apis for languages like C and C++.

Upvotes: 0

anon
anon

Reputation:

The industry standard for database connectivity is ODBC, which is a C API. This Wikipedia link provides a brief overview and lots of links to other resources.

Upvotes: 6

Related Questions