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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add or Update data into the database

Status
Not open for further replies.

d1004

Programmer
May 9, 2002
78
US
I tried to add the password that the users setup into the database. Basically, they entered their Alias, now
they have an opportunity to setup their password. This is the code that I have... But somehow it gives me
the following error message when I run it:

Error = "Operation must use an updateable query"

Here are my codes:

<%
Option Explicit
Dim strConnect
%>
<!-- METADATA TYPE = &quot;typelib&quot; FILE = &quot;C:\Program Files\Common Files\System\ado\msado15.dll&quot; -->
<html>
<head>
<title> Add User's Password Info </title>
</head>
<body>
<%
Dim objRS, objConn,

strConnect = &quot;Driver={Microsoft Access Driver (*.mdb)};&quot; & _
&quot;DBQ=&quot; & Server.MapPath(&quot;Login.mdb&quot;)&&quot;;&quot; & _
&quot;Persist Security Info = False&quot;


Set objConn = Server.CreateObject(&quot;ADODB.Connection&quot;)
Set objRS = Server.CreateObject(&quot;ADODB.Recordset&quot;)
objConn.open strConnect

objRS.Open &quot;tblLoginInfo&quot;, objConn, adOpenForwardOnly, adLockOptimistic, adCmdTable

objRS.Filter = &quot;Alias = '&quot; & Session(&quot;Alias&quot;) & &quot;'&quot;

objRS(&quot;Password&quot;) = Request.QueryString(&quot;PWord&quot;)

objRS.Update

objRS.Close
objConn.Close
Set objRS = Nothing
Set objConn = Nothing
Response.Redirect &quot;menu.asp&quot;

%>

</body>
</html>

I don't know what I am doing wrong, please help!!!
-d1004
 
$5 says that the IIS user doesn't have write permissions to the directory that the access db is in. You need to give write permissions if you want to update it. foo
 
Chopsaki,
Hehehe, you won that $5
MrGreed,
The website was great, thanks again!!!
Thank you!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top