database connectivity with C/C++

Status
Not open for further replies.

QwertyManiac

Commander in Chief
The database you wish to use will have its own set of libraries to use from. If you tell us what kind of database are you attempting to connect from your C(++) application to, we can help better. :)
 

anshul

Journeyman
I also came here to ask a similar question.
Using filesystems can't we make file associations to every other type of file like for example database file with .mdb extension.
I gave It a simple trial but it does not open in text or in binary mode.
Is it possible??
 

QwertyManiac

Commander in Chief
Extensions are just indicative in nature and serve no other purpose other than being that. The file's contents are in no way related to the extension its name carries. So no, file-systems and extensions are not related either and you can not do what you are trying to via that way.
 

anshul

Journeyman
"Extensions are just indicative in nature and serve no other purpose other than being that. The file's contents are in no way related to the extension its name carries. So no, file-systems and extensions are not related either and you can not do what you are trying to via that way."

Then please suggest how to create a database in C/C++
 

QwertyManiac

Commander in Chief
You can use one of the many APIs to connect to / edit / create / modify / delete databases and their components. For instance, MySQL provides an API MySQL++ for use with C++ language. Likewise, depending upon your choice of Database you can get them from their official sites.

As for simple accessing and create/edit/modify/delete of its records/tables, you can use generic drivers, Visual C++ would have help files on those, check them out. I have only used these functionalities from within Visual Basic so I do not know the C++ requirements.

Simply search databases on MSDN's C++ page perhaps, if your domain is Windows. If Unix, you should find enough docs in /usr/share/doc already :)

P.s. If its a small one just use simple hash tables
 

knight17

In the zone
SQLite is a very simple DB. Here is an article explaining how to work with it from C++

- *www.sqlite.org/capi3.html
 
Status
Not open for further replies.
Top Bottom