Any assistance would be greatly appreciated. I have a final project I am working on that is a simple webbot. After the webbot completes, the program finds the IP, and IP class, then inserts the information to an access DB using a JDBC connection. The programming is done, but when I execute the program, it fails on a DB import. The rest of the code runs without issue. Here is the offended code:
statement.execute("INSERT INTO TheData (IPAddress, URL, IPClass) VALUES (" + address.getHostAddress() +", " + url1 + ", " + getClass(address) + ") ");
The following error is returned:
java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression 'Class A'.
at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc .java:6956)
at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java :7113)
at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java :3109)
at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcSt atement.java:337)
at WebBot.dbWriter(WebBot.java:163)
Any help would be greatly appreciated.