• 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Problem accessing AS/400 database thru' JDBC  RSS feed

 
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 is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!