Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

ASP Classic - Form to MDB Database (Error 0x80004005)

ASP Classic - Form to MDB Database (Error 0x80004005)

ASP Classic - Form to MDB Database (Error 0x80004005)


I try to learn a tutorial to send data from a html form to MDB database but I receive this error:

Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/MyWeb/form_to_database/add_to_database.asp, line 35

The code is like this:

1. form.htm

<title>Form to Database</title>
<!-- comment - start the HTML form and use a HTML table for formatting-->
<form name="form1" action="add_to_database.asp" method="post">
<div align="center">
<table width="80%" border="0">
<td>Name :</td>
<td><input type="text" name="name"></td>
<td>Email :</td>
<td> <input type="text" name="email"></td>
<td>Comments :</td>
<td><textarea name="comments"></textarea></td>
<td><input type="submit" value="submit details" name="submit"></td>
<!-- end the HTML form-->

2. add_to_database.asp

<%@ 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")
comments =Request.Form("comments")

'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=" & Server.MapPath("Users.mdb")
'create an ADO connection object
Set connection = Server.CreateObject("ADODB.Connection")

'Open the connection to the database

'execute the SQL

response.write "The form information was inserted successfully."
'Done. Close the connection object
Set connection = Nothing

3. users.mdb

Is there anybody here could help me and teach me a bit ?

Thank you.





RE: ASP Classic - Form to MDB Database (Error 0x80004005)

Thanks jbenson001 !


RE: ASP Classic - Form to MDB Database (Error 0x80004005)

You got it.. Hope you get your answer

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close