SQL Databases ...

Dec 1, 2009 at 10:48pm
Greetings xD this is my first post n i think it's a kind of 'dizzy' question ..
Well the main problem is with sql databases ...

More specific :
> I created a database on an SQL Server ( MSSQL ) , meaning i created tables,diagramms etc ....

>So I want now to make an application that will initialize an sql connection BUT without having the sql server in an other machine ..

--Conclusion ...
>I searched around the internet n didn't find anything ..
If someone can help me with these questions , or just show me the road to read from i would be very thankfull ...

1-How i can connect to sql databases with pure c++ code
2-How i can execute sql queries from a DB without having the sql server installed??

Sry for my strange english xD it's not my mother language ....
Regards John Georgoudakis xXx
Dec 1, 2009 at 11:21pm
The traditional way to connect to SQL Server is thru ODBC. There are new protocols, but ODBC remains supported.

If you're finding ODBC a headache, you can check out SQLAPI+, a C++ library that wraps a number of common databases.

You don't execute SQL. The database executes it. It's the way you instruct the database.
Dec 1, 2009 at 11:23pm
A development environment usually has some support of databases treating.

In Borland C++ there are components ADOConnection, ADOTable (DBConnection, DBTable), TDataSource, TDataSet and others that allow you to work with a database, either local or remote.

Dec 1, 2009 at 11:29pm
Thank you for your replies , but this do not help me ...
By the way I use embarcadero rad studio environment and i had used these components

>adoconnections
>datasources
etc ....

My question was on how to connect to database with PURE c++ code ...
Sql Api is remain unregister cuz u have to pay for it and after all is not portable ( not in the standards of libraries )

There are some .h files provided in my IDE such as sql.h bla bla ....

But really i didnt find code on how to handle these headers ....
Any other suggestions ?
Dec 2, 2009 at 10:13am
PURE C++ doesn't support databases inherently. You need some libraries for this. So pay for extensions or use opensource libraries as wxWidgets. Moreover wxWidgets is cross-platform.

http://docs.wxwidgets.org/stable/wx_odbcoverview.html
Topic archived. No new replies allowed.