In this post, I’ll cover how to create a simple C/C++ program that interacts with MySQL using the C API (and Connector/C). I discussed in a previous post how to install the C Connector (both SkySQL and MySQL’s), so please refer to that if you are looking for more specifics on that.
So once you have that set up, then there are just a few more things you need to have in order – at least this was the case in my environment.
1. Create a program (this one simply connects to the server and retrieves the server version):
#include <stdio.h> #include <windows.h> #include <mysql.h> …[Read more...]