hello...i am doing a project on connecting c language with sql. but i am unable to write the program in c language by using the sql code for connectivity. plz advise me as how to learn to write the c program using sql.

What SQL library are you trying to use? Is it an implementation of the ODBC API's, or something specific for a particular database. For example, MySQL has its own library for C and C++ connectivity (my current project uses their C++ library). Oracle has similar. They both have ODBC and JDBC libraries (JDBC == Java DataBase Connectivity, ODBC Open DataBase Connectivity) as well. ODBC is generally a C library, and JDBC is a Java library (.jar files).

Thanks for your replies..I am trying to connect it with c library.I am using windows 7 operating system & i wish to compile my program in c. The main idea behind my project to bring the student's log book in c language by connecting it with the sql database.
For this, i don't know how to write the program in c language for connectiing it with sql.
plz guide me with some proper & clear tutorials for writing that program. If possible, plz guide me with example programs.

thanks.

Unfortunately there are not a whole lot of tutorials in C language. The link I posted is probably one of the most comprehensive -- take a few days to study it well. Have you tried to google for "odbc c tutorials"? It's somewhat complicated stuff so you won't find anything short and simple. Requires a bit of studying and some practice. There are some c++ class wrappers, but if you are stuck with C language then they won't be of any use to you.

Edited 3 Years Ago by Ancient Dragon

That's a bad link -- I get "File not found" error. Maybe the link it to a site which I don't have permissions to read. MySQL is a specific kind of SQL server so the contents of that pdf may or may not apply to other SQL server programs. If it teaches standard ODBC then you should be ok with it.

Here are some more MySQL-specific tutorials you might be interested in.

Edited 3 Years Ago by Ancient Dragon

This article has been dead for over six months. Start a new discussion instead.