java - Why am I getting the error SQLException: [Microsoft][ODBC Excel Driver] Too few parameters. Expected 1 -
I am using the following code to upload keywords; Numbers in an Excel file I have as a primary key to the code is keyword_id
I have two columns in the Excel file I Lkkiward and 2kkount
My code is:
while (rs.next ()) {System.out.println ("inside"); String keyword = rs.getString (1); Int count = rs.getInt (2); System.out.println ( "SEARCHABLE_KEYWORDS values (" + keyword + "," + count + "Insert"); ( "+ + + +", "+ + + + Count '' '' ') ;););););) System.out.println (keyword + "+ keyword +" calculated "+ count);}
but I am getting the following error: < / p>
java.sql.SQLException: [Microsoft] [ODBC Excel driver] very few parameters sun.jdbc.odbc.JdbcOdbc on Sun.jdbc.odbc.JdbcOdbc.createSQLException (JdbcOdbc.java:6998) Sun.jdbc.odbc.JdbcOdbc.SQLExec Direct (JdbcOdbc.) Is expected on .standardError (JdbcOdbc.java:7155) .Java: 3151) sun.jdbc.odbc.JdbcOdbcStatement.execute (JdbcOdbcStatement.java378) sun. Jdbc.odbc.JdbcOdbcStatement.executeQuery (JdbcOdbcStatement.java:284) w On keywordsreader.main (keywordsreader.java:42) on
count < / code> is a reserved keyword, so if you have a column
SEARCHABLE_KEYWORDS
table count
in double quotes the column name ( ")
Comments
Post a Comment