Re: suggestions for SQLJ&JDBC
Date: Tue, 20 Aug 2002 12:10:16 +0200
Message-ID: <3D621588.DF959677_at_intersystemsww.com>
ida wrote:
>
> SQLJ is Oracle's way of allowing you to embed SQL in Java.Though JDBC
> can be error-prone, can be a bugger to debug, but it's generally
> straight-forward and everyone else understands how to use it.
> Right?
>
> My db is oracle, I want my program cross platform and cross db.
> 1.Can SQLJ cross platform and cross db?
> 2.Compared with JDBC, does SQLJ have any shortage?
Hi Ida,
If I'm not mistaken, SQLJ is not "Oracle's way" -- it's the
"standard" way of allowing you to embed SQL in java. SQLJ is
just another level of abstraction above JDBC. Your SQLJ source
code gets translated to java source code with the embedded SQL
translated to pure JDBC.
As far as I'm concerned, JDBC is no harder (or easier ;-) to debug than any other java code. Actually, with "P6Spy", it's probably easier to debug!
Your SQLJ (and/or JDBC) code is _always_ cross platform -- it's the JDBC driver that isn't.
[Quoted] [Quoted] So to summarize -- and answer your questions:
- Yes, SQLJ is cross platform and cross DB as much as java and JDBC is cross platform (and cross DB).
- Since SQLJ gets translated to JDBC, I don't think that SQLJ has any "shortages" (assuming I correctly understand what you mean by "shortages" ;-)
Hope this has helped you.
Good Luck,
Avi.
Received on Tue Aug 20 2002 - 12:10:16 CEST