Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Java Databases > Re: Accessing m...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 10 Topic 3683 of 3800
Post > Topic >>

Re: Accessing mainframe DB2 in Java.

by Mark Space <markspace@[EMAIL PROTECTED] > Mar 22, 2008 at 04:42 PM

Arne Vajhøj wrote:
> zalek wrote:
>> On Mar 22, 5:14 pm, Arne Vajhøj <a...@[EMAIL PROTECTED]
> wrote:
>>> zalek wrote:
>>>> I am a mainframe Cobol programmer (yes - Cobol programmers are still
>>>> around, mostly in caves) and I am writing a java code to access DB2.
>>>> In a Cobol world after each SQL command we are checking for return
>>>> conditions like success (sqlcode=0), not found (sqlcode = +100),
>>>> duplicates (sqlcode=803) and more.
>>>> How do you check for this conditions in Java?
>>> Usually (possible always) the JDBC driver will throw an SQLException
>>> if not success.
>>
>> Yes - I know - but I would like to know what exactly happen. For
>> example - if I try to access a table using a variable as a key - I
>> would like to know "not found conditions" occurred to display correct
>> message. If database was down - I would like to know it too. Is there
>> a way in a java world to find it?
> 
> e.getErrorCode() will give you SQLCODE number.

Duh.  You know I looked right at that in the Javadocs and because it 
didn't say "getVendorCode" I didn't read any further?  Ouch.
 




 10 Posts in Topic:
Accessing mainframe DB2 in Java.
zalek <zalekbloom@[EMA  2008-03-22 14:12:06 
Re: Accessing mainframe DB2 in Java.
=?ISO-8859-1?Q?Arne_Vajh=  2008-03-22 17:14:40 
Re: Accessing mainframe DB2 in Java.
zalek <zalekbloom@[EMA  2008-03-22 14:28:01 
Re: Accessing mainframe DB2 in Java.
=?ISO-8859-1?Q?Arne_Vajh=  2008-03-22 19:02:25 
Re: Accessing mainframe DB2 in Java.
Mark Space <markspace@  2008-03-22 16:42:58 
Re: Accessing mainframe DB2 in Java.
Mark Space <markspace@  2008-03-22 14:28:25 
Re: Accessing mainframe DB2 in Java.
Mark Space <markspace@  2008-03-22 21:36:42 
Re: Accessing mainframe DB2 in Java.
i.dont.need@[EMAIL PROTEC  2008-03-23 20:22:09 
Re: Accessing mainframe DB2 in Java.
Mickey <mickeyb@[EMAIL  2008-03-25 11:14:51 
Re: Accessing mainframe DB2 in Java.
Alex.From.Ohio.Java@[EMAI  2008-03-25 11:45:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 4:53:05 CDT 2008.