Connecting to MSSQL using C++ (Not visual C++)

Hi all,

I am using Code::Blocks for writing C++ code. I am trying to find on the internet, with no success, how to connect to a Microsoft SQL 2008 R2 server using C++ (MinGW compiler) and perform a very Simple SQL query.

I have looked all over the internet but most sites refer you to Visual Studio which I am not allowed to use due to their simplified methods of connecting (the DB connection wizards etc).

I have found SQLAPI++ which is something you pay for. As a software engineering student I also may not use third party software like SQLAPI++ to make this project work. Also, I cannot afford it.

I do not really mind which method (ODBC, ADO etc) is used as long as my project and the SQL Server API's does all the work.

I will really appreciate it if someone can point me in the right direction.
You just need an appropriate connection string.
Topic archived. No new replies allowed.