Hi ALL,
I tried to to read and write the data through excel files.But i am facing some issues while reading and writting the data.The exceptions which are coming are mentioned below
__________________________________________________ _________________________________
Exception:
sqlselect 'villno','fno','w_name', 'age','idno','adcode','caste','educ','height' from [studyhb$]
java.sql.SQLException: Column not found
at sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(Unknown Source)roundSQL
select `month1`,`year1`,`round1`, `ttab1`,`teat1`,`m_wt1`,`m_pre1`, `eff11`,`eff12`,`eff13`,`hedu1`,`other1` from [studyhb$] where villno='' and fno='' and w_name='' and idno=''
at sun.jdbc.odbc.JdbcOdbcResultSet.getString(Unknown Source)
at db.ReadOdbc.WriteFirstRowOfInputSheet(ReadOdbc.jav a:283)
at db.ReadOdbc.main(ReadOdbc.java:66)
java.sql.SQLException: Column not found
at sun.jdbc.odbc.JdbcOdbcResultSet.findColumn(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcResultSet.getString(Unknown Source)
at db.ReadOdbc.GetSQLString(ReadOdbc.java:240)
at db.ReadOdbc.WriteFirstRowOfInputSheet(ReadOdbc.jav a:300)
at db.ReadOdbc.main(ReadOdbc.java:66)
java.sql.SQLException: [Microsoft][ODBC Excel Driver] Data type mismatch in criteria expression.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source)
at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(Unkno wn Source)
at db.ReadOdbc.WriteFirstRowOfInputSheet(ReadOdbc.jav a:305)
at db.ReadOdbc.main(ReadOdbc.java:66)
java.lang.NullPointerException
__________________________________________________ _______________________________
I want that the data i am reading should be wriiten in excellsheet(output).The write file is now writting only headers.
Please guide me how to do this