Ask a Question related to IBM DB2, Design and Development.
-
sdfg #1
DB2 & Java Frustration -HELP!
Greetings,
I have cross posted this as it is a frustration we are having with the use
of DB2 in Java applications.
We have had DB2 installed now for a few months and we have been trying to
develop stored procedures etc.
We are getting very frustrated with a few things.
1. Documentation seems to be all over the place. We look on the web at the
documentation and it tends to "elude" to things, but the fine details are
either spread throughout other parts of the documentation or missing. Is
this a frustration everybody else finds as well or just me not looking in
the right places? I cant seem to find any reasonable books on this stuff
either.
2. DB2 appears to act quite differently when calling stored procedures.
After having build a large number of stored procs we are now discovering
that we cant create a scrollable result sets in java so that we can step
through and do things like find how many records there are in the RS etc.
Also finding that the when we call a stored proc many of the errors that are
returned at the command line are not returned in via JDBC to the
application. Is it just that JDBC drivers for DB2 are immature or are there
tricks somewhere that we dont know about (we have looked at the examples and
followed them closely, though they do not go through an example of
scrollable Result sets in java).
3. Are we supposed to be usind the IBM JDK ?? Will that make life easier, or
is there little difference between this and Sun JDK
4. Are the IBM DB2 courses worth doing, are we just suffereing from post MS
SQL, POSTGRESQL blues?? and need to start thinking about things a little
differently.
We have been trying to move our development from Postgres (full working
application using postgresql database and user defined functions) to DB2 for
the last 2 months and we are getting more and more frustrated with the way
that things seem to work (our frustration is particularly with the
documentation and how calling stored procs from within a java application
seems to be limited by the JDBC driver when compared to calling straight sql
wrt. recordsets and other functions you can call on the data).
There are 2 of us working on this DB2 project together and we both have
large amounts of experience with databases including MS SQL, Postgresql,
Mysql, Sybase, Oracle. Neither of us have used db2 before and we are finding
it most frustrating !!
Any help, suggestions, others experiences would be appreciated.
Using;
Db2 V8.1 (all service packs installed) running on Redhat 8.0
Sun JDK
Netbeans IDE.
JDBC type 4 drivers as supplied by IBM in latest fixpack.
Regards
Ben Stewart.
*thud*
sdfg Guest
-
Severe Frustration!!!
OK, Please excuse the slightly angered tone of this post but I'm in serious trouble and overwhelmed by frustration. I work for a company... -
backup frustration
Greetings. I am trying to restore a copy of our production database onto a development server. I have been backing up my database using the... -
Cache Frustration!
I'm having a big problem with cache. I have 3 radio buttons that each show a differnt div with a form on it on an asp page. When submitted whatever... -
Frustration.
I bought an e machine in March of this year with Windows XP loaded and a trial version of McAfee Internet Security loaded too. I then bought a... -
XP Networking frustration
Per SW vendor request I had to move a shared folder from a 2000 Server to an XP Pro share on the local domain. Share was setup with full control... -
Robert Klemme #2
Re: DB2 & Java Frustration -HELP!
I can't comment on every point but I know that frustrating feeling with
DB2 well, too.
"sdfg" <benstewart74@nospam.yahoo.com.au> schrieb im Newsbeitrag
news:iUi7b.90893$bo1.3709@news-server.bigpond.net.au...etc.> 2. DB2 appears to act quite differently when calling stored procedures.
> After having build a large number of stored procs we are now discovering
> that we cant create a scrollable result sets in java so that we can step
> through and do things like find how many records there are in the RSare> Also finding that the when we call a stored proc many of the errors thatthere> returned at the command line are not returned in via JDBC to the
> application. Is it just that JDBC drivers for DB2 are immature or areand> tricks somewhere that we dont know about (we have looked at the examplesThe JDBC driver is an especial annoyance because it contains native parts> followed them closely, though they do not go through an example of
> scrollable Result sets in java).
(and is thus not very mobile with regard to platforms and needed external
installation programs) and we got into trouble when trying to connect to a
DB2 on an AS400 and a DB2 on a Win machine at the same time. Awful!
easier, or> 3. Are we supposed to be usind the IBM JDK ?? Will that make lifeI doubt that this will make life easier for you. After all, JDBC drivers> is there little difference between this and Sun JDK
are supposed to work with any JDK.
MS> 4. Are the IBM DB2 courses worth doing, are we just suffereing from postlittle> SQL, POSTGRESQL blues?? and need to start thinking about things aI find MS SQL far more convenient than DB2, they even have a pure Java> differently.
JDBC driver. (Quality is debatable but at least it's portable.)
for> We have been trying to move our development from Postgres (full working
> application using postgresql database and user defined functions) to DB2way> the last 2 months and we are getting more and more frustrated with theapplication> that things seem to work (our frustration is particularly with the
> documentation and how calling stored procs from within a javasql> seems to be limited by the JDBC driver when compared to calling straightIMHO part of your frustration stems from the fact that you are using> wrt. recordsets and other functions you can call on the data).
different relational DB's - they're less compatible than one might think.
The other part comes from DB2 beeing a bit - err - complicated. I've
spend quite some time on IBM web sites in search for drivers and doc,
too...
Good luck!
robert
Robert Klemme Guest
-
PM \(pm3iinc-nospam\) #3
Re: DB2 & Java Frustration -HELP!
Full message text is not returned when using SQLException.getMessage()
By default, the DB2BaseDataSource.retrieveMessagesFromServerOnGetM essage
property is disabled. If you enable this property, all calls to the standard
JDBC SQLException.getMessage() invoke a server-side stored procedure, which
retrieves the readable message text for the error. By default, the full
message text is not returned to the client when a server-side error occurs.
You can use the proprietary method DB2Sqlca.getMessage() to retrieve the
fully formatted message text. A call to the SQLException.getMessage() method
will start a unit of work only if retrieveMessagesFromServerOnGetMessage is
enabled. A call to the DB2Sqlca.getMessage() method results in a stored
procedure call, which starts a unit of work. Prior to FixPak 1, the
DB2Sqlca.getMessage() method may throw an exception.
PM
PM \(pm3iinc-nospam\) Guest



Reply With Quote

