Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to check if a column exists - are there any functions in jdbc

843859Mar 12 2008 — edited Mar 13 2008
I am using mysql db connecting via JDBC. I need to make sure that current version of a product (say A.2) is compatible with another product (B.1 and B.2) . The problem is I have some new columns in B.2 which B.1 does not have. So If i install A.2 with B.1 - I am getting an invalid column error. A.2 works well with B.2 because those cols are present in B.2 Any suggestions appreciated. Can I use getInt("colindex") instead of getInt("colName") ...I guess this would still throw error if the cols are not present in the table.

Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 10 2008
Added on Mar 12 2008
10 comments
1,281 views