• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem accessing AS/400 database thru' JDBC  RSS feed

 
SRV Gopal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Please could anyone let me know why the following code does not work as it is intented to? I am trying to access AS/400 database file(BBLH) thru' JDBC. I am getting the trapped error: Type was: Char, Type was ecimal,etc, continuously depending on the number of columns and rows I have in the BBLH table. I have my ODBC setup done correctly. Help!!!

 
Eric Pramono
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I believe that here's some data type conversion between AS/400 and Java:
AS/400 java.SQL.Types
CHARACTER CHAR
ZONED NUMERIC
PACKED DECIMAL
Try the following code:

hope this helps.
- eric
 
Jane Griscti
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sodiambakkam,
I'm going to move this thread to Intermediate Java as it's not related to Certification Study.
------------------
Jane Griscti
Sun Certified Programmer for the Java� 2 Platform
 
SRV Gopal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric,
Thanks for your reply. So the only change I need is the different driver parameter to Class.forName? I will try it out ...
Venu
 
SRV Gopal
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eric,
Assuming the only change I needed to do in my code was to use the different driver that you suggested, I recompiled my code and I am still getting the same error message on execution. Am I missing something in your code? Help!
Venu
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!