IE 显示如下信息:
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access 驱动程序] 参数不足,期待是 3。 /myweb/mgpr.asp, line 19
另外,我对INSERT INTO 的语法不太清楚。
非常感谢您的帮助。
<%
'get the form variables
productid=TRIM (Request ("product id"))
productname=TRIM (Request ("product name"))
productnumber=TRIM (Request ("product number"))
'open database connection
Set Con=Server.CreateObject("ADODB.Connection")
Con.Open "molDSN"
%>
<html>
<body>
<%
'add new product
if productname<> "" then
sqlString=" INSERT INTO module1 (product_id,product_name, product_number)" &_
" VALUES( productid,productname,prouctnumber) "
Con.Execute sqlString
%>
<table>
<tr><td><%=productname%> was added to the database</td></tr></table>
<%
end if
%>
<a href="addpr.asp">Add product</a>
</body>
</html>
Microsoft OLE DB Provider for ODBC Drivers error '80040e10'
[Microsoft][ODBC Microsoft Access 驱动程序] 参数不足,期待是 3。 /myweb/mgpr.asp, line 19
另外,我对INSERT INTO 的语法不太清楚。
非常感谢您的帮助。
<%
'get the form variables
productid=TRIM (Request ("product id"))
productname=TRIM (Request ("product name"))
productnumber=TRIM (Request ("product number"))
'open database connection
Set Con=Server.CreateObject("ADODB.Connection")
Con.Open "molDSN"
%>
<html>
<body>
<%
'add new product
if productname<> "" then
sqlString=" INSERT INTO module1 (product_id,product_name, product_number)" &_
" VALUES( productid,productname,prouctnumber) "
Con.Execute sqlString
%>
<table>
<tr><td><%=productname%> was added to the database</td></tr></table>
<%
end if
%>
<a href="addpr.asp">Add product</a>
</body>
</html>