Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: Fixed 80040e8c caused DB Error 80004005


Message #1 by "Brad Stokes" <brad.stokes@t...> on Thu, 5 Sep 2002 00:44:38
Hi I posted earlier about a problem I was having with an update query, 
thanks for your help ken it really helped. I seem to have now caused 
another
the query I'm trying to out put is:

UPDATE tblUsers SET firstname ='', surname ='brad.stokes ', 
username='Stokes ', userpassword='', access='Admin ', 
email='brad.stokes@t... ', phone='', fax='', mobile='12', 
section='TLRU ', campus='Wollongong ' WHERE userid = 1; 


The error I recieve is as follows:

Microsoft OLE DB Provider for ODBC Drivers error '80004005' 

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

/cnj/nUsers.asp, line 42 

I can't figure out what I'm doing wrong

The code is as follows. The opendb.htm has all the connection info. I know 
that works because I use it elsewhere with no problems. the other code is 
driving me insane.

<!-- #include file="includes/adovbs.inc"-->
<!-- #include file="includes/opendb.htm" -->
<%

dim qryStr, rsQry

qryStr = "UPDATE tblUsers " & _
		" SET " & _
		" firstname  ='" &  Request.Form("ffirstname") & _
		"', surname  ='" & Request.Form("fsurname")  &_
		"',   username='" & Request.Form("fusername")  &_
		"',   userpassword='" & Request.Form("fuserpassword")  &_
		"',   access='" & Request.Form("faccess")  &_
		"',   email='" &	Request.Form("femail")   &_
		"',   phone='" & Request.Form("fphone")  &_
		"',   fax='" & Request.Form("ffax")  &_
		"',   mobile='" & Request.Form("fmobile")  &_
		"',   section='" &	Request.Form("fsection")   &_	
		"',   campus='" &	Request.Form("fcampus")   &_
		"' WHERE userid = " & (Request.QueryString("uid"))&";"
		Response.Write "<BR>" & qryStr 
		

	set rsQry = server.CreateObject("ADODB.Command")	
	
	rsQry.ActiveConnection = dbConnect
	rsQry.CommandText = qryStr
	rsQry.CommandType = adCmdText
	rsQry.Execute
	
Could someone please enlighten  me I would really appreciate it.

Cheers
Brad
Message #2 by "Brad Stokes" <brad.stokes@t...> on Thu, 5 Sep 2002 02:21:11
Funnily enough I fixed the problem myself. It actually had a twofold 
reason. One was permissions on the database, the other pagetimeout.

To fix the problem I opened the properties panel on the db and set the 
security permissions to allow the SQL administrator sufficient rights to 
change the db.

The other thing was I access the Datasource(ODBC) panels in the 
administrative tools. located the DSN that I was accessing, I clicked on 
Modify, then Advanced and set the PageTimeout from 5 milliseconds to 500, 
That really knocked the problem on the head.

I don't know if this experience will help anyone else, but I thought I 
would let you know what fixed the problem

Cheers
Brad


  Return to Index