No support for OLE DB in Java

Hi,

How can it be that there is no support for OLE DB in Java. ODBC is no longer being developed and will probably soon die. All .NET programs insist on supporting only OLE DB or ADO.

What options do I have if I need to connect my Java program with a database behind an OLE DB interface? I can't be alone with this probelm.

Br,

Tom

[363 byte] By [fidgea] at [2007-10-2 16:56:22]
# 1

Hi Tom,

What are you really trying to accomplish? I'm not sure what you mean when you say a database is "behind" an OLE DB interface. Are you talking about Java accessing data directly through the OLE DB drivers provided by Microsoft and other 3rd party vendors or are you talking about something else?

Just for fun, what would your answer be if I posed the question; why don抰 Microsoft technologies allow you to connect through JDBC?

To my knowledge there is no JDBC-OLEDB bridge but I think the need for that would be very small, but if there was a need and it was technically feasible, I抦 sure some enterprising company would fill it.

Java's JNI interface may allow you to achieve whatever you are attempting, but again I抦 not clear on what exactly your goals are.

There may very well be a solution that allows Java and something 揵ehind?an OLE DB interface to successfully interact, and maybe I抦 not the right guy to answer the question, but I think it would help if you could be a little more specific on the problem you are trying to solve.

WorkForFooda at 2007-7-13 18:09:04 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 2

> Hi,

>

> How can it be that there is no support for OLE DB in

> Java. ODBC is no longer being developed and will

> probably soon die. All .NET programs insist on

> supporting only OLE DB or ADO.

>

> What options do I have if I need to connect my Java

> program with a database behind an OLE DB interface? I

> can't be alone with this probelm.

>

Use a pure JDBC driver. The ODBC bridge driver was originally intended to bridge the initial gap between the many databases that had ODBC drivers and the few that had JDBC drivers available.

At this juncture though there is a JDBC driver available for almost any database you can want. Many of these drivers are type 4 (pure Java) drivers as well.

I do not think that ODBC will "die" any time soon however I do agree that eventually it will be replaced by OLE. This is the one reason I would suggest not to use the ODBC bridge driver if a suitable alternative is available.

I wouold not hold my breath waiting for Sun to develop an OLE bridge driver. I think this is very unlikely to happen for a variety of reasons but mainly due to general lack of interest. As there is very likely a pure JDBC driver available for the database you are using there is no need to develop a further bridge type driver.

WorkForFooda at 2007-7-13 18:09:04 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 3

>

> There may very well be a solution that allows Java

> and something 揵ehind?an OLE DB interface to

> successfully interact, and maybe I抦 not the right

> guy to answer the question, but I think it would help

> if you could be a little more specific on the problem

> you are trying to solve.

I would suspect that someone somewhere has a type 3 driver that provides Java to OLE usage. I also suspect one could use some sort of ActiveX wrapping tool like JACOB to do this.

But to be honest I can't think of a good reason that one would want to use OLE.

WorkForFooda at 2007-7-13 18:09:04 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 4

Microsoft doesn't support JDBC because they are trying to sell .NET (and not support J2EE). The vendor of the design managament system (that is now based on .NET) I have to work with only provides a OLE DB connection to the system database. So it's not like I have a choice!

Is ODBC really the only "none-native" way to connect to a database (under Windows) in Java?

fidgea at 2007-7-13 18:09:04 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 5
Oh yeah, not a OLE DB connection but a OLE DB Provider :)
fidgea at 2007-7-13 18:09:04 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 6
> Microsoft doesn't support JDBC Yes they do. But anyway others support it as well.Rather than making us guess what database you are trying to talk to why don't you tell us. What type of database are you attempting to communicate with?
fidgea at 2007-7-13 18:09:04 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 7

> Microsoft doesn't support JDBC because they are

> trying to sell .NET (and not support J2EE). The

> vendor of the design managament system (that is now

> based on .NET) I have to work with only provides a

> OLE DB connection to the system database. So it's not

> like I have a choice!

>

> Is ODBC really the only "none-native" way to connect

> to a database (under Windows) in Java?

Again, without knowing what you want to do, or do it with, most of what can be written in this thread can only be presumptive, and it would be hit or miss that the responses address your actual problem. You haven't described any problem that can be addressed, and until you do, I don't believe you will receive any posts that will be of much help to you.

J2EE and .NET are competing technologies from different vendors. So is Linux and Windows, but Microsoft supports Linux within Microsoft抯 virtual server. So some interoperability does exist between Microsoft products and competing technologies. If you were forthcoming with some details of your issue it is possible that interoperability options are available to you.

Are you looking for a solution, or just someone to agree with your premise that it can be difficult to blend JDBC and OLE DB into a single integrated application code base? If so, then I agree it is difficult to integrate JDBC and OLE DB into single application code base and that combination should probably be avoided.

Having said that, from what little you have said, I see no problem in anything that you are trying to do. Whatever database you are using can be accessed using either J2EE/JDBC Java/JDBC or .NET technologies including SQL Server, MS Access, Oracle, Sybase, DB2/UDB, and many more. Your premise that you want to access these databases using OLE DB through Java is flawed and makes no sense, so that is not a concern and does not affect the ability of competing technologies (JDBC, OLE DB) to successfully access a single database instance. A networked database is application vendor neutral and doesn抰 know or care what technologies are being used to access it.

Here is a suggestion. Describe the problem you are having, what the functionality is you are attempting to develop, the technologies you are using and what you have tried so far that has not worked.

WorkForFooda at 2007-7-13 18:09:04 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 8

> Is ODBC really the only "none-native" way to connect

> to a database (under Windows) in Java?

I don't know what you mean by "non-native".

If you mean, non-JDBC, then no. At least some databases will let you use CORBA, and Java (allegedly) does CORBA just fine (I've never used it), and has been doing it for at least 9 years.

http://www.javaworld.com/javaworld/jw-10-1997/jw-10-corbajava.html

http://www.javaworld.com/javaworld/jw-10-2002/jw-1025-corba.html

StuDerbya at 2007-7-13 18:09:04 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 9

Hi,

As I mentioned I'm struggling with a design management system that uses a closed database. The vendor of the program sells an OLE DB provider that can be used to access the database.

My problem is that it seems like there is no way to access an OLE DB data source using Java, am I right? If there is any way I can connect to an OLE DB provider using Java, I would like to know :)

Sorry if my question was incoherent.

Br,

Tom

fidgea at 2007-7-13 18:09:05 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 10

> Hi,

>

> As I mentioned I'm struggling with a design

> management system that uses a closed database. The

> vendor of the program sells an OLE DB provider that

> can be used to access the database.

>

If by "closed" you mean propreitary then in a word, "hosed". The only possible solution is a type 3 driver (which is also a bridging type of driver) and it will connect to OLE on your behalf.

Type 3 means middleware so the setup would end up being.

Java -> Type 3 Driver (pure Java) -> Middleware -> (other driver OLE?) -> Your database

fidgea at 2007-7-13 18:09:05 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 11

> If by "closed" you mean propreitary then in a word, "hosed".

Well, that comes pretty close to summing it up. If I was in a pinch, I might look to third party vendors to help, but I honestly don't now if there is a practical solution:

Here is the type of link that I thought may be interesting to you: http://openaccesssoftware.com/

WorkForFooda at 2007-7-13 18:09:05 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 12
Free tool for using OLE DB from Java http://www.javakonkurs.ru/show_project.screen?project_id=191Retreive data from MS EXchange folders, Address books, Outlook mailboxes, Active Directory accounts e.t.c
sss1024a at 2007-7-13 18:09:05 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...
# 13

Re:

>Free tool for using OLE DB from Java

>http://www.javakonkurs.ru/show_project.screen?project_id=191

Unfortunately, there's not too much non Russian support beyond google translate. English (or German, French, Spanish ;) would be nice.

I have the same question/problem as fidge:

There's a windows based system, providing access via their own oledb provider.

This works fine in the windows world: (ADO, ADO.net, linked server in MS-SQLserver2000 or 2005, etc.).

They do not have an ODBC driver any more :-(

Problem now: how to easily build a jdbc driver for this scenario?

All SQL queries should be simply passed to the oledb provider.

Additionally: this jdbc driver should run native java, thus requiring some middleware (windows based) bridge.

Up to now, I found

- jadozoom http://www.infozoom.de/en_jadoZoom.shtml (jdbc to ado)

- RMIJDBC http://rmijdbc.objectweb.org (jdbc to jdbc bridge)

Combining both bridges works somehow... Besides performance, there's some loss regarding data type info, so I'm not too happy.

I want to avoid building the whole stuff from scratch...

Questions:

- is javakonkurs.ru project 191 (more) suitable for my need? can someone check/translate, (beyond google translate) please ?

- any other possible solution?

I agree with fidge's suspect: I (we) cannot be alone with this task ...

Thanks

DataFiddlera at 2007-7-13 18:09:05 > top of Java-index,Database Connectivity,Java Database Connectivity (JDBC)...