Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #9467

Re: looking for a simple JAVA code to attach to SQL via ODBC

Path csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!nx02.iad01.newshosting.com!newshosting.com!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From Lew <lewbloch@gmail.com>
Newsgroups comp.lang.java.programmer
Subject Re: looking for a simple JAVA code to attach to SQL via ODBC
Date Thu, 3 Nov 2011 13:54:16 -0700 (PDT)
Organization http://groups.google.com
Lines 25
Message-ID <31728236.280.1320353657204.JavaMail.geo-discussion-forums@prgt40> (permalink)
References <88b3745a-8824-4863-b97e-f793b571b966@m19g2000yqh.googlegroups.com>
Reply-To comp.lang.java.programmer@googlegroups.com
NNTP-Posting-Host 2620:0:1000:2404:224:d7ff:fe69:5838
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
X-Trace posting.google.com 1320353658 31104 127.0.0.1 (3 Nov 2011 20:54:18 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Thu, 3 Nov 2011 20:54:18 +0000 (UTC)
In-Reply-To <88b3745a-8824-4863-b97e-f793b571b966@m19g2000yqh.googlegroups.com>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=2620:0:1000:2404:224:d7ff:fe69:5838; posting-account=CP-lKQoAAAAGtB5diOuGlDQk0jIwmH0T
User-Agent G2/1.0
X-Google-Web-Client true
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:9467

Show key headers only | View raw


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.

-- 
Lew

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

looking for a simple JAVA code to attach to SQL via ODBC eAddict <eaddict@gmail.com> - 2011-11-03 13:04 -0700
  Re: looking for a simple JAVA code to attach to SQL via ODBC Lew <lewbloch@gmail.com> - 2011-11-03 13:54 -0700
    Re: looking for a simple JAVA code to attach to SQL via ODBC Arne Vajhøj <arne@vajhoej.dk> - 2011-11-03 17:01 -0400
      Re: looking for a simple JAVA code to attach to SQL via ODBC Lew <lewbloch@gmail.com> - 2011-11-03 18:06 -0700
        Re: looking for a simple JAVA code to attach to SQL via ODBC Arne Vajhøj <arne@vajhoej.dk> - 2011-11-03 22:28 -0400
    Re: looking for a simple JAVA code to attach to SQL via ODBC Roedy Green <see_website@mindprod.com.invalid> - 2011-11-04 15:53 -0700
  Re: looking for a simple JAVA code to attach to SQL via ODBC Arne Vajhøj <arne@vajhoej.dk> - 2011-11-03 16:59 -0400
  Re: looking for a simple JAVA code to attach to SQL via ODBC Roedy Green <see_website@mindprod.com.invalid> - 2011-11-03 22:07 -0700
    Re: looking for a simple JAVA code to attach to SQL via ODBC Arne Vajhøj <arne@vajhoej.dk> - 2011-11-04 21:45 -0400

csiph-web