Re: looking for a simple JAVA code to attach to SQL via ODBC
- From: Arne Vajhøj <arne@xxxxxxxxxx>
- Date: Thu, 03 Nov 2011 17:01:24 -0400
On 11/3/2011 4:54 PM, Lew wrote:
On Thursday, November 3, 2011 1:04:41 PM UTC-7, eAddict wrote:First, a bit of background. I am trying to get UDConnect (a SAP
product) to work. This requires a JAVA connection from the HP-UX
system to a MS SQL server using an ODBC driver.
You want to avoid connecting to the DBMS via ODBC. Use JDBC (Java DataBase Connectivity) or, better yet, JPA (Java Persistence API). EclipseLink and Apache OpenJPA are two good JPA implementations.
I looked at the MS knowledge base (http://support.microsoft.com/kb/
313100) to see some sample code. Well, this sample is good if going
from a MS system to another MS system.
You're talking about Java. Microsoft will not be your best source of information about Java.
IBM Developerworks and the Oracle Java pages are your best initial source.
Problem is I don't know/code Java. I would like to have a simple java
program on my HP-UX system that tests the ODBC connection the same way
the MS example does.
Anyone have a sample they can share?
Mostly Java programs do not use ODBC. In the rare cases where they do, it's ugly. It's much better to connect directly to the database through Java than to go through yet another intermediate layer.
The link is using JDBC and not via the JDBC ODBC bridge.
And direct JDBC is probbaly better than JPA for testing connectivity!
- Prev by Date: Re: looking for a simple JAVA code to attach to SQL via ODBC
- Next by Date: Re: Trivial question?
- Previous by thread: Re: looking for a simple JAVA code to attach to SQL via ODBC
- Next by thread: Re: looking for a simple JAVA code to attach to SQL via ODBC