java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters

后端 未结 2 1834
一生所求
一生所求 2021-01-19 05:42

It seems that this part of my code is where the exception occurs:

c = dbConnection.getConnection(); 
q = \"SELECT * FROM book WHERE nextInc<=? AND inlib=?         


        
2条回答
  •  执念已碎
    2021-01-19 05:48

    After checking all of my column names, I also discovered that double quotes around a string literal will cause the same error.

    Wrong: WHERE foo LIKE "bar"

    Right: WHERE foo LIKE 'bar'

    Just an FYI for any non-Access folks scratching their heads (like me).

提交回复
热议问题