I am working on a problem where I need to store and retrive the data from the database . I am using C for that on windows system . I am familiar with MYSQL database . I just need to know whether its possible for me to access database using C if yes which IDE I can use and how can I connect it to MYSQL .
You can code SQL statements in a C or C++ program wherever you can use executable statements. Each SQL statement in a C or C++ program must begin with EXEC SQL and end with a semicolon (;). The EXEC and SQL keywords must appear on one line, but the remainder of the statement can appear on subsequent lines.
MySQL database is available on most important OS platforms. It runs on BSD Unix, Linux, Windows, or Mac OS. To be able to compile C examples, we need to install the MySQL C development libraries. The above line shows how we can do it on Debian based Linux.
C/C++ Interface APIs Following are important C/C++ SQLite interface routines, which can suffice your requirement to work with SQLite database from your C/C++ program. If you are looking for a more sophisticated application, then you can look into SQLite official documentation.
Yes, you can connect your C code to MySQL using a connector (driver) available on MySql home page: http://www.mysql.com/products/connector/
There is a nice tutorial on writing C programs accessing MySQL: MySQL C API programming tutorial
You can use any IDE you want for writing your code, for example Visual Studio. Here you can download a free version: http://www.microsoft.com/visualstudio/11/en-us/products/express
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With