0

I'm connecting an excel file and java through a odbc driver.
After connection is made (and it works),i want to get a value from a column called Net amount 2.5%.

 while(rs.next())
 {  
    String e=rs.getString("Net Amount 2.5%"); 
    JOptionPane.showMessageDialog(null,e ) 
 }

The error i'm getting is column not found After researching on net a little i got to know that mysql does not allow . in column names.
please suggest a code to get the value from column Net Amount 2.5%.

Thank you!!

seagull
  • 1
  • 1

1 Answers1

0

A solution in that case is to use the index of the column instead of its name :

rs.getString(i)
Denys Séguret
  • 372,613
  • 87
  • 782
  • 758