kampi kampi - 1 year ago 86
SQL Question

How to make an SQL query from a C/C++ application?

Possible Duplicate:

How to execute sql statements from a C program?

I'm creating a C application, and i need some data from my SQL server. Does anyone know how can I make an SQL query from my C application under Windows?

Answer Source

With C, you'll probably want to use the Microsoft ODBC API: http://msdn.microsoft.com/en-us/library/ms714562(v=VS.85).aspx

I use this heavily in my CSQLBinding class, which contains lots of usage samples. Besides the encapsulating class, (which is obviously C++ only) all of the functionality is completely compatible with plain C.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download