Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 25th, 2004, 03:53 PM
Authorized User
 
Join Date: Feb 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default updata

Kindly me with my update statment; it's giving me the following error

Microsoft OLE DB Provider for ODBC Drivers error '80004005'

[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.

/BegASP/student1.asp, line 42

  Here's the code:
% Response.Buffer = False %>

<html>
<head>
<Title>Passoword change website</title>
</head>
<body>
<h2>Password change response<h2>
<%

'Declare variable needed
Dim strSql
Dim adCmdText

adCmdText = 1

'Retrieve the values
varStudentID = Request.Form("StudentId")
varPassword = Request.Form("Password")
varNewpassword = Request.Form("NewPassword")


'start building sql statement
strSql = "Update ftpserver_users Set"
strSql = strSql & " Password ='" & varNewpassword & "'"
strSql = strSql & " WHERE ID =" & varStudentID
strSql = strSql & " AND Password='" & varPassword & "'"

'Create and Open connection to database
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.OPen "DSN=users"

'Create command object
Set objCmd = Server.CreateObject("ADODB.Command")

'Set Command Properties
Set objCmd.ActiveConnection = objConn
objCmd.CommandText = strSql
objCmd.CommandType = adCmdText

'Execute Command
objCmd.Execute

'Response.Write " Your passwords has been changed."
'Response.write " The number of record that has changed is: " & _
' intnumofrecord & " records<BR><BR>"

Set objCmd = Nothing
objConn.Close
Set objConn = Nothing

%>











</form>
</body>
</html>


 
Old February 25th, 2004, 04:09 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

This error message usually indicates a permissions issue. Take a look here: http://support.microsoft.com/default...;en-us;q175168 (bullet 1) for more info.

To fix it, make sure that the account IIS runs under (usually IUSR_MachineName) has sufficient permissions to write to the database and the folder it resides in.

Cheers,

Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old February 27th, 2004, 02:42 PM
Authorized User
 
Join Date: Feb 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default

 I have tried all the options I have, and it's not working.










Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.