Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert data problem HTTP 500.100 Error

Status
Not open for further replies.

DanielTech

Programmer
Mar 2, 2004
8
US
Hi,
I am trying to populate a database with some data and it works the first time, then I went back to the page that contains the form (I refresh)and I try again and it gives me the HTTP 500.100 Error. Here is my code:


<%
Dim strSql
Dim objConn, objRS

Dim name
name = Request.Form("name")


Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("mydatabase.mdb"))

strSql = "insert into Table1 (name) values ('" & name & "')"

objConn.Execute(strSql)
Response.Write "done!!!"
objConn.Close
Set objConn =Nothing

%>

Any idea why is not working properly?
thanks,
DanielTech
 
It's probably a duplicate record. What are the field constraints on your table?
 
I solved it. It had to do with the write permissions.
Thanks,
DanielTech
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top