ASP code...help me fix it ?

Mohammed A

New member
I get an error which says :
Error Type:
Microsoft JET Database Engine (0x80004005)
Operation must use an updateable query.
/register.asp, line 36
line 36 is the one with **

Code is as follows :
<html>
<head>
<title>Register</title>
</head>
<link rel="stylesheet" type="text/css" href="hyperstyle.css">
<body background="background.jpg">
<font color="white">
<center><h1>Register !!!</font></h1><hr>
<br><br
<form name=f1 action=register.asp method=POST>
<table bgcolor="#997700" style="color:white;" border=1>
<tr><td>Choose a Username : </td><td><input type="text" name="user"></td></tr>
<tr><td>Choose a Password : </td><td><input type="text" name="pass"></td></tr>
<tr><td align=center colspan=2><input type="Submit" name="Submit" value="Submit"></td></tr>
<tr><td colspan=2 rowspan=2><a href="Login.asp">Login Page</a><br>
<a href="Information.html">Information Page</a></td></tr>
</table>
</form>
<%@ Language="VBScript" %>
<%
Dim user, pass
Dim sConnString, sSQL, connection

user=Request.Form("user")
pass=Request.Form("pass")



sConnString="PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & Server.MapPath("Users.mdb")

Set connection = Server.CreateObject("ADODB.Connection")
connection.Open(sConnString)

sSQL = "INSERT INTO Users (UName, PWord) Values ('"&user&"', '"&pass&"' )"
**connection.execute(sSQL)

Response.write("Data was successfully added.")
%>
</body>
</html>
 
Back
Top