0
我嘗試使用ASP文件的HTML文件連接到Access數據庫的HTML文件連接到Access數據庫,這裏的代碼我嘗試使用ASP
<html>
<body>
<%
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.ACE.OleDb.12.0"
conn.Open "D:\test\test.mdb"
sql="INSERT INTO db (customerID,companyname,"
sql=sql & "contactname,address,city,postalcode,country)"
sql=sql & " VALUES "
sql=sql & "('" & Request.Form("custid") & "',"
sql=sql & "'" & Request.Form("compname") & "',"
sql=sql & "'" & Request.Form("contname") & "',"
sql=sql & "'" & Request.Form("address") & "',"
sql=sql & "'" & Request.Form("city") & "',"
sql=sql & "'" & Request.Form("postcode") & "',"
sql=sql & "'" & Request.Form("country") & "')"
conn.close
%>
</body>
</html>
當我按下提交上面的代碼顯示在瀏覽器上,沒有acion完成?
你說「使用asp」和代碼*看起來像經典ASP(我不是專家),但你標記了這個[asp.net]。傳統的ASP和ASP.NET沒有密切的關係。確保你知道你正在處理哪一個。 – Quentin