IE说:Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OleDb.OleDbException: INSERT INTO 语句的语法错误。
_____________________________________________
程序:
<%@ import namespace="system.data" %>
<%@ import namespace="system.data.oledb" %>
<script language="vb" runat="server">
sub enter_Click(sender as object,e as eventargs)
dim conn as new oledbconnection("provider=microsoft.jet.oledb.4.0;data source=" & server.mappath("../databace/wwwlink.mdb"))
dim sql as string
sql="insert into wwwlink(sitename,url,intro,grade,submit_date) values('" & sitename.text & "','" & url.text & "','" & intro.text & "'," & cint(grade.selecteditem.text) & " , #" &now() &"#"
dim cmd as new oledbcommand(sql,conn)
conn.open()
cmd.executenonquery()
conn.close()
message.text="提交成功"
end sub
</script>
辛苦了!!!