×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

ASP file

<%@ Language=VBScript %>

<%
option explicit
dim conn, sql
dim mdbfile, strConnString
mdbfile = "/data/contact.mdb"
strConnString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath( mdbfile ) & ";"

set conn = server.CreateObject ("ADODB.Connection")
conn.Open strConnString

dim firstName
firstName = Trim (Request.Form("first"))

sql = "insert into users (first) values ('" & firstName & "')"
conn.Excecute (sql)
%>

<html>
Thanks for your registration,
<% Response.write firstName %>
</html>
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / tztz, please help
    • html file
      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
      <HTML>
      <HEAD>
      <TITLE> New Document </TITLE>
      <META NAME="Generator" CONTENT="EditPlus">
      <META NAME="Author" CONTENT="">
      <META NAME="Keywords" CONTENT="">
      <META NAME="Description" CONTENT="">
      </HEAD>

      <BODY>
      please input your first name:
      <form method="POST" action="contact.asp">
      <input type="text" name="first" size="3">
      <input type="submit" value="Send Request" name="Send Request"
      </BODY>
      </HTML>
    • ASP file
      <%@ Language=VBScript %>

      <%
      option explicit
      dim conn, sql
      dim mdbfile, strConnString
      mdbfile = "/data/contact.mdb"
      strConnString = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath( mdbfile ) & ";"

      set conn = server.CreateObject ("ADODB.Connection")
      conn.Open strConnString

      dim firstName
      firstName = Trim (Request.Form("first"))

      sql = "insert into users (first) values ('" & firstName & "')"
      conn.Excecute (sql)
      %>

      <html>
      Thanks for your registration,
      <% Response.write firstName %>
      </html>
    • 什么问题呀?
    • error message
      Error Type:
      Microsoft OLE DB Provider for ODBC Drivers (0x80040E37)
      [Microsoft][ODBC Microsoft Access Driver] The Microsoft Jet database engine cannot find the input table or query 'Excecute'. Make sure it exists and that its name is spelled correctly.
      /addil/contact.asp, line 17
    • 有我公司的电话吗?
      • 没有。:-(
    • conn.Excecute (sql) ==> conn.Execute(sql)
      • Thank you very much! :)
      • :))))))))))
        • 哇你笑我呀,过分耶 :((((((((((
          • 还说, 害我今天自责了好久。 偶就没看出错来 :(
            • 搞电脑就是要眼神好
            • ???
          • Error Message得很清楚了啊。
    • 偶愣某看出来
    • 惨愧,偶也没看出来.