<% name1 = TRIM( Request.Form( "name" ) ) password1 = TRIM( Request.Form( "password" ) ) IF name1 <> "" AND password1 <> "" THEN mySQL = "INSERT into register(name,password) VALUES ('"&name1&"', '"&password1&"')" Set Con = Server.CreateObject("ADODB.Connection") Con.Open "FILE Name=C:\Access.UDL" Con.Execute mySQL END IF %>
<html> <head><title>Insert Data</title> <body> <form method="post" action="insert1.asp"> <P>name: <input name="name" size=4> <p>password: <input name="password" size=20> <p><input type="submit" value="Add Data"> </form> </body> </html> C:\Access.UDL内代码如下 [oledb] ; Everything after this line is an OLE DB initstring Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\medicine.mdb;Persist Security Info=False
连接那些应该没问题,因为做过查询成功了的 帮我找找错啊