Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

database loading in C++

Status
Not open for further replies.

jerkymotion

Member level 4
Joined
Oct 12, 2010
Messages
73
Helped
28
Reputation
56
Reaction score
28
Trophy points
1,298
Location
NEPAL
Activity points
1,824
i might be wrong here .....
i have completely no idea about database and how to load it in C++....
is it possible??
please help me thoroughly how to make simple database using visual C++ and load datas back to program...:-|
 

Try looking up the linguafranka of non OO DB's coma seperated format (CSV)

Very simply it's in ASCII format, each CR terminated line represents a record from a DB table. Each table column value is given in order in the line seperated by commas. If a value is a text string it has double quotes around it.

There are a few more rules but you can do most of it with the above info and "exporting" from your DB program in "CSV" format as far as I'm aware nearly all modern DB's do this.

If however you want to do things on the fly then look at ODBC and friends.

If you are looking for a C code library to implememt a DB there are several around ranging from the old Berckly DB library through to some quite modern OODB engines.

But start with the WikI CSV entery,,

Comma-separated values - Wikipedia, the free encyclopedia

And then look at the Berkeley DB of which Oracal activly support three types

Berkeley DB - Wikipedia, the free encyclopedia

Finaly look at ODBC

Open Database Connectivity - Wikipedia, the free encyclopedia

Hopefully those three pages will give you sufficient info as to what is out there and how to use it.
 

Database loading in C/C++ can be done in many ways. If you want pure M$ approach, you can use the drivers that come with VC. If you want cross platform approach, install an ODBC driver for the database, and lookup ODBC programming in C++ on google. ODBC programming is more 'C' style and not at all easy. A better way is to use a Object Relational Mapping (ORM) library so you can fill in values of objects and get them mapped to database tables. One good library (cross platform) which I use for last ten years is found here: Object adapter for ODBC
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top