<% Option Explicit %>
<html>
<head>
<title>ThaiCreate.Com ASP & Microsoft Access Tutorial</title>
</head>
<body>
<%
Dim Conn,strSQL,objExec
Set Conn = Server.Createobject("ADODB.Connection")
Conn.Open "DRIVER=Microsoft Access Driver (*.mdb);DBQ=" & Server.MapPath("mydatabase.mdb"),"" , ""
strSQL = ""
strSQL = strSQL &"INSERT INTO customer "
strSQL = strSQL &"(CustomerID,Name,Email,CountryCode,Budget,Used) "
strSQL = strSQL &"VALUES "
strSQL = strSQL &"('"&Request.Form("txtCustomerID")&"','"&Request.Form("txtName")&"', '"&Request.Form("txtEmail")&"' "
strSQL = strSQL &",'"&Request.Form("txtCountryCode")&"','"&Request.Form("txtBudget")&"', '"&Request.Form("txtUsed")&"') "
Set objExec = Conn.Execute(strSQL)
If Err.Number = 0 Then
Response.write("Save Done.")
Else
Response.write("Error Save ["&strSQL&"] ("&Err.Description&")")
End If
Conn.Close()
Set objExec = Nothing
Set Conn = Nothing
%>
</body>
</html>