Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / November 2007

Tip: Looking for answers? Try searching our database.

what if any are the recommended ways of accessing a database using jdbc from a c++ application?

Thread view: 
Jeff Kish - 02 Nov 2007 21:03 GMT
what if any are the recommended ways of accessing a database using jdbc from a
c++ application?

I have a large c++ app suite with a database layer that may need to change how
it accessed a variety of db's, so I thought I would find out if it was
reasonable/possible to use jdbc from c++.
thanks
Jeff
Jeff Kish
Arne Vajhøj - 02 Nov 2007 23:52 GMT
> what if any are the recommended ways of accessing a database using jdbc from a
> c++ application?
[quoted text clipped - 3 lines]
> reasonable/possible to use jdbc from c++.
> thanks

You don't use JDBC in C++.

You could use JNI to call some Java code from your C++ code and let
the Java code use JDBC, but that would be extremely cumbersome.

Use another database API.

ODBC, OLE DB, your database vendors embedded SQL, a proprietary
library from your database vendor.

Arne
Lee Fesperman - 04 Nov 2007 21:32 GMT
> what if any are the recommended ways of accessing a database using jdbc from a
> c++ application?

There are commercial odbc-jdbc drivers. A couple can be found at
www.openlinksw.com and www.easysoft.com. I don't have any experience
with them, but they undoubtedly use JNI. You can also google 'odbc-
jdbc drivers'.

--
Lee Fesperman, FFE Software, Inc. (http://www.firstsql.com)
==============================================================
* The Ultimate DBMS is here!
* FirstSQL/J Object/Relational DBMS  (http://www.firstsql.com)
Roedy Green - 04 Nov 2007 23:29 GMT
>what if any are the recommended ways of accessing a database using jdbc from a
>c++ application?

You would not use JDBC. Most SQL engines will come with a C++ library
for accessing it directly.
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Lothar Kimmeringer - 06 Nov 2007 19:00 GMT
> what if any are the recommended ways of accessing a database using jdbc from a
> c++ application?

If you want to use something like the JDBC-framework, you might
take a look at http://libodbcxx.sourceforge.net/ but I don't
know anything about the current status and the quality of
the library.

Regards, Lothar
Signature

Lothar Kimmeringer                E-Mail: spamfang@kimmeringer.de
              PGP-encrypted mails preferred (Key-ID: 0x8BC3CD81)

Always remember: The answer is forty-two, there can only be wrong
                questions!



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.