If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 jdbc error

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-10-04, 12:21
Falcon_down Falcon_down is offline
Registered User
 
Join Date: Aug 2004
Location: India
Posts: 13
DB2 jdbc error

I have a db2 table T_CNTRT_NOTES

When I run the following query through my java application :

SELECT TRANSACTION_NUMBER FROM DB2ADMIN.T_CNTRT_NOTES WHERE CONTRACT_NOTE_NUMBER = '111111'

I get the following error

COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0611E Invalid column name. SQLSTATE=S0022

though the column already Exists

When I run the same query from db2 command line it works fine

I am using IBM DB2 version 8.1 on AIX 4.3

Any help would be greatly appreciated

Thanks

Falcon
Reply With Quote
  #2 (permalink)  
Old 08-10-04, 12:52
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Are you connected to the same database in both cases ...

In your application use the metadata apis and get information on the table columns and confirm the column exists in the database you connect to

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
  #3 (permalink)  
Old 08-10-04, 13:07
Falcon_down Falcon_down is offline
Registered User
 
Join Date: Aug 2004
Location: India
Posts: 13
Hi Sathyaram

I am connected to the same database and the column exists in the database

The query runs fine on DB2 command line but it fails in java application

Regards

Falcon
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On