How to connect to SQL via C?

I am doing a project in C and I need access to the database. How do you connect to a C-language database and access it? I am using MySQL currently.

+3
source share
3 answers

There are many solutions, depending on the database you are using and which OS you are using. One solution that provides broad access to an array of combinations will be ODBC. You must connect to the database using the SQLConnect function and use other API functions to fulfill your queries.

The connections are specific to Windows, but you can find analogues for any OS that you will use on your side.

+1
source

, ( ), SQLite .

, , (MySQL, MS SQL Server, Oracle ..), , .

+1

Or you can choose ODBC, which allows you to connect to various databases.

+1
source

All Articles