Click here to Skip to main content
15,896,606 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
Hi,

I am creating a Project for my company which needs to connect to any database.
Could anyone tell me how can I do that ?
Posted

I'm really sorry to do this ... You will find your answer on this link http://www.lmgtfy.com/?q=c%2B%2B+connect+to+database[^]
 
Share this answer
 
hi,
You have mentioned 'connect to any database'. Initially its better to choose 1 database and start development.
You will need the interfaces(drivers and libraries) provided by the databases that you intend to use.
Do the proper installations and read the literature before jumping in.

For Oracle database there are OCI classes. Official Oracle page for OCI[^].

Similarly for MySql there is MySql Connector look at tutorial here[^]

For SQL Server you can refer to this question[^]

My previous answers to related questions link1[^] and link2[^]
If you plan to use some database other than these, then you can google for the interfaces they provide for working with C++.

hope this helps !!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900