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


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

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

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.42!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-1.proxad.net!198.186.194.250.MISMATCH!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 18:06:07 -0700 (PDT)
Organization http://groups.google.com
Lines 43
Message-ID <11320388.182.1320368767789.JavaMail.geo-discussion-forums@prev11> (permalink)
References <88b3745a-8824-4863-b97e-f793b571b966@m19g2000yqh.googlegroups.com> <31728236.280.1320353657204.JavaMail.geo-discussion-forums@prgt40> <4eb30125$0$289$14726298@news.sunsite.dk>
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
Content-Transfer-Encoding quoted-printable
X-Trace posting.google.com 1320368768 23532 127.0.0.1 (4 Nov 2011 01:06:08 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Fri, 4 Nov 2011 01:06:08 +0000 (UTC)
In-Reply-To <4eb30125$0$289$14726298@news.sunsite.dk>
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:9488

Show key headers only | View raw


On Thursday, November 3, 2011 2:01:24 PM UTC-7, Arne Vajhøj wrote:
> 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 the OP asked for ODBC.  I was responding to his question, not to the link.

> And direct JDBC is probbaly better than JPA for testing connectivity!

If that's all you're doing, sure.  Couldn't agree more.

-- 
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