I'm trying to make a simple JSP page which will post data from a form into a database (Hypersonic SQL). The following code:
Gets me this error:
SQL Exception: General error java.lang.IllegalArgumentException in statement [INSERT INTO Snippets (Author, DatePosted, Title, Code) VALUES('author1', 'theDate1', 'title1', 'code1') ]Thank you for submitting a snippet. Return to Snippet List
Anyone know what's going on?
Code:
Connection con = DriverManager.getConnection("jdbc:hsqldb:/members/QxUdPuc5YiTgxPUGg5PJY8cJ6OahZ0jA/db/codepasterdb", "sa", "");
String author1 = request.getParameter("name");
String title1 = request.getParameter("title");
String code1 = request.getParameter("code");
java.sql.Date theDate1 = new java.sql.Date(2003, 11, 23);
Statement stmt = con.createStatement();
stmt.execute("INSERT INTO Snippets (Author, DatePosted, Title, Code) VALUES('author1', 'theDate1', 'title1', 'code1')");
stmt.close();
con.close();
Gets me this error:
SQL Exception: General error java.lang.IllegalArgumentException in statement [INSERT INTO Snippets (Author, DatePosted, Title, Code) VALUES('author1', 'theDate1', 'title1', 'code1') ]Thank you for submitting a snippet. Return to Snippet List
Anyone know what's going on?