4

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

c = dbConnection.getConnection(); 
q = "SELECT * FROM book WHERE nextInc<=? AND inlib=?";
s = c.prepareStatement(q); 
s.setBigDecimal(1,BigDecimal.valueOf(curDate.getTime())); 
s.setBoolean(2,false); 
rs = s.executeQuery(); <-- Error.

I'm using "sun.jdbc.odbc.JdbcOdbcDriver".

2 Answers 2

5

As per this, the error could occur because of non-existent column.

Could you put the structure of the table here?

Sign up to request clarification or add additional context in comments.

1 Comment

I feel like an idiot, I mistyped the column name. Thanks for the help.
0

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).

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.