Last post Oct 20, 2010 05:03 PM by hans_v
Oct 20, 2010 03:01 PM|zehrasyeda|LINK
I am trying to create a website that takes input from users and then updates a table in MS Access db.
I have a plain html form that takes the imput and in the action I entered the asp file name.
Once a user clicks on submit on the html page I get the 500 internal server error.
I properly uploaded the files on the server,
I have created a DSN on the server, but cannot see the DSN under the "Select ODBC DSN" when I try to create a connection from DreamWeaver.
I am using a 64 bit machine so nto sure if that might be causing the problem.
Here is code form asp file :
<% @ Language="VBScript" %>
<% Option Explicit %>
<title>Form to database</title>
'declare your variables
Dim name, email, comments
Dim sConnString, connection, sSQL
' Receiving values from Form, assign the values entered to variables
name = Request.Form("name")
email = Request.Form("email")
'declare SQL statement that will query the database
sSQL = "INSERT into users_tbl (name, email, comments) values ('" & _
name & "', '" & email & "', '" & comments & "')"
'define the connection string, specify database
'driver and the location of database
sConnString=("Provider=Microsoft.Jet.OLEDB.4.0;Data Source='d:/hosting/6859771/html/access_db/Users.mdb';User Id=;Password=")
'create an ADO connection object
Set connection = Server.CreateObject("ADODB.Connection")
'Open the connection to the database
'execute the SQL
' Done. Close the connection object
Set connection = Nothing
response.write "The form information was inserted successfully."
Oct 20, 2010 05:03 PM|hans_v|LINK
All forums on www.asp.net are intended for ASP.NET (.aspx) related questions only, you're using classic ASP (.asp). Please ask your question(s) on another forum.
And yes, most likely the problem is your server (64 bit).