Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VisualAge bug??

Status
Not open for further replies.

HoMyGod

Programmer
Jul 17, 2000
59
CH
Hi,

I am trying to use the "Visual Composition" of VisualAge (v3.02). What I want to do is to make a connection to my database (MySql), to extract some info and to display them in a JTable. I use for that the Select1 bean of IBM that is a standard one.
My problem is when I want to display the informations. I can see that there is no problem if the data stored in the DB are varchar, but if the data are "int", the program generate a NullPointerException. I tried all the possibilities of mapping, but it doesn't change anything.
Could anybody help me?

Thanx
H.
 
Im not familiar with Visual Age, but is the Select1 bean getting the information from the ResultSet for you, or does it return the ResultSet to you and you pull the information out yourself?

Basically what it sounds like is happening is all of the columns are being taken out with the method:
ResultSet.getString( columnIndex )

If you have an INT column , you should use ResultSet.getInt( columnIndex ) for that column.

I think if you use for instance, rs.getString( 5 ) when column 5 is an INT value, it will return null.

 
Unfortunatly, I don't have the chance to manipulate the ResultSet. The bean do (should do!) everything. I can configure it but it seems that the mapping don't work fine...

H.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top