• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Problem accessing AS/400 database thru' JDBC

 
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!!!

 
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
 
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
 
It looks like it's time for me to write you a reality check! Or maybe a tiny ad!
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic