my dog learned polymorphism
The moose likes JDBC and Relational Databases and the fly likes creating objects Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "creating objects" Watch "creating objects" New topic

creating objects

Antoine Waugh
Ranch Hand

Joined: Jan 24, 2004
Posts: 66
hey there, i have the following objective:
To search through an excel sheet, view the Field values for each line, and create objects based on their field value.
i can connect and call queries successfully from the excel file, and have the following issue:
the excel file is something like
now, what i thought of doing is going through each line of the excel file, and assigning Object Show the following values:
Show.addName(rs.getString( "SHOWNAME" ))
etc.. (please note the above code is for example only.)
what i have done is tried to return these values using the system.out command, ranther than jump straight into object creation, and the following works and compiles, but throws:
"java.sql.SQLException: [Microsoft][ODBC Excel Driver] Numeric field overflow"

then i could replace the system.out calls to be instructions to add to my object. My sql is not very strong, and i was wondering what the best approach would be to achieve what i am hoping. I am aware that the scalability of this is rather large, as i am pre-loading a whole file into my applicatoin, however for the purpose of the application's gui and functionality, it is the best approach.
Thanks for your time, all suggetions and code appreciated

B.C.S.T, SCJP, Hero
Antoine Waugh
Ranch Hand

Joined: Jan 24, 2004
Posts: 66
to be more specific, here is another working example of what i am trying to achieve. Is this method appropriate for reading in databases, and will it be possible with the use of an applet?

thanks in advance
I agree. Here's the link:
subject: creating objects
jQuery in Action, 3rd edition