C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old May 23rd, 2003, 11:51 PM
Cylish Cylish is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Sydney , Australia
Posts: 3 Cylish User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to Cylish
Lightbulb Best way to communicate with database (mysql/pgsql etc) in C++ under Linux/FreeBSD ?

Hi ,

I wanted to access Database from C++ in Linux.

I am currently using :

libpqxx of PostgreSQL under c++ (gcc).


but i wanted to use:

unixODBC/iODBC with any database..
but then i have to use some c++ database library like :

DATABASE template library (DTL)
URL

or
libODBC++/FreeODBC++
URL

DTL is too complicated to use and documented poorly !!

and libODBC++ doesn't compile properly
and it's interface also looks complicated and poorly documented..

libpqxx of PostgreSQL works great ! ...
but i am kinda limited to one database platform...

Please advice me , if you know any better solution.

Thanks for your time .

Reply With Quote
  #2  
Old May 24th, 2003, 01:42 PM
dcaillouet's Avatar
dcaillouet dcaillouet is offline
Big Endian
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2001
Location: Fly-over country
Posts: 1,172 dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 29 m 5 sec
Reputation Power: 29
This may not be of any interest to you since it is a commercial product, but I've been using it for a couple of years and have found it to be very useful for working with different databases on different hardware.

http://www.sqlapi.com

It supports Oracle, MS SQL, Sybase, DB2, Informix, Interbase/Firebird, Centura SQLBase, MySQL and Postgresql on Windows, Linux and Solaris. For me, it was worth the money but you would have to determine if it fits your needs.

OTL is in the same ballpark as DTL so I don't know if using it would gain you anything. I've never used it, so I can't make a recommendation.
http://otl.sourceforge.net/

Reply With Quote
  #3  
Old May 25th, 2003, 02:15 AM
Cylish Cylish is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Location: Sydney , Australia
Posts: 3 Cylish User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to Cylish
Wink thanks !

thanks,

but i am only looking for Open Source solution ..

DTL/OTL works fine .. but it's very complicated to use and very poorly documented ..

i am wondering ,, how big open source programms interact with database..

how PHP , CGIs (those written in c++) achieve this ?

Reply With Quote
  #4  
Old May 25th, 2003, 06:33 AM
dcaillouet's Avatar
dcaillouet dcaillouet is offline
Big Endian
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: May 2001
Location: Fly-over country
Posts: 1,172 dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level)dcaillouet User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 16 h 29 m 5 sec
Reputation Power: 29
Most of the PHP cross-database programs I've seen use ADOdb . But from what I can tell, this is just for using PHP to connect to multiple databases, not C++. But don't take my word for it because I'm not a web programmer. There might be something useful there.

The guys at the Gnome project wrote a database abstraction layer called GNOME-DB . Read the introduction and see if it is what you're looking for.

Also you might want to take a look at these:
http://tazthecat.net/~isaac/sqloco/
http://gql.sourceforge.net/
http://dbstep.sourceforge.net/
http://hk-classes.sourceforge.net/
http://sourceforge.net/projects/dbconnect/

Last edited by dcaillouet : May 25th, 2003 at 06:44 AM.

Reply With Quote
  #5  
Old May 26th, 2003, 08:15 AM
maulikpatel maulikpatel is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2003
Posts: 6 maulikpatel User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Lightbulb Thanks !

Thanks ! dcaillouet

I am looking in to GNOME-DB now..
(but no success yet !)

maybe this is the solution i am looking for ...


Cheers,

maulik

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > Best way to communicate with database (mysql/pgsql etc) in C++ under Linux/FreeBSD ?

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap