我想加入一段日期变量进入数据库
代码如下:
java.sql.Date publisheddate=new java.sql.Date(year,month,day);
String query = "INSERT INTO Books (Title,Author,ISBN,PublishedDate,Publisher) VALUES ('" + title + "','" + author + " ','" + i*****n + "','" + publisheddate + "','" + publisher + "')";
错误如下:
javax.servlet.ServletException: [Microsoft][ODBC Microsoft Access Driver] The INSERT INTO statement contains the following unknown field name: 'PublishedDate'. Make sure you have typed the name correctly, and try the operation again.
网上实在找不到解决办法了,请各位高人帮忙看看。
谢谢。
请问JSP+MS ACCESS的问题
所有跟帖:
•
错误在这里
-我不灵啊。。。-
♀
(145 bytes)
()
11/08/2004 postreply
03:56:02
•
你数据库中日期那一项的类型是什么?
-不知道对错-
♀
(83 bytes)
()
11/08/2004 postreply
05:02:15
•
我在access里用的是日期型变量
-还是不灵。。。-
♀
(0 bytes)
()
11/08/2004 postreply
08:09:10