|
 |
asp_databases thread: Problem with updateable query after website has been moved
Message #1 by John Doolan <Johnd@m...> on Thu, 14 Sep 2000 21:36:23 +0100
|
|
Hi All,
This afternoon my website was moved from one server to another by my
ISP and since then there has been an intermittent fault occurring with the
error message:
Microsoft JET Database Engine error '80004005'
Operation must use an updateable query.
/addBasket.asp, line 42
Following on from other messages in the past I have asked the administrator
to ensure that the IUSR account has full access to the database files and
directory. I have also changed the code to ensure that the connection
object is in mode 3 (see below). Are there any other reasons why this may
be happening? The code worked absolutely fine before and the administrator
assures me that IUSR has permissions. Is it possible (or likely) that
permissions to any other users need to be granted? Is the administrator
telling the truth? I am at my wits end!!
- John Doolan
*** Full Output to screen: ***
Qty = 5
btnAdd = Add
StockDesc = SE-C45 Compact Best Buy
StockCode = 1002
Make = SCOTCH
Price = 2.49
INSERT INTO Orders (CustID,StockCode, StockDesc, Qty, Price, Make,
DateStamp) VALUES ('PB4/28/00 4:18:08 PM194.126.64.49_0.9090387', '1002',
'SE-C45 Compact Best Buy', '5', '2.49', 'SCOTCH', #9/14/00 9:40:15 PM#)
Microsoft JET Database Engine error '80004005'
Operation must use an updateable query.
/addBasket.asp, line 42
*** End of screen output ***
*** Full code listing ***
<%@ LANGUAGE=VBSCRIPT %>
<% Option Explicit %>
<% Response.Buffer = True %>
<!-- #INCLUDE FILE="Connection.asp" -->
<!-- METADATA TYPE="typelib" FILE="C:\Program Files\Common
Files\System\ado\msado15.dll" -->
<%
Dim objItem, conBPM, strMyID, strSQL, tmpQty, tmpDate
Response.Expires = 0
For Each objItem In Request.Form
Response.Write objItem & " = " & Request.Form(objItem) & "<BR>"
Next
If Session("StrMyID") <> "" and IsNumeric(Request.Form("Qty")) Then
tmpQty = Request.Form("Qty")
tmpQty = Int(tmpQty)
Set conBPM = Server.CreateObject("ADODB.Connection")
conBPM.Mode = 3
conBPM.Open strConn
If ConBPM.State = adStateOpen Then
'Response.Write "<B>Connection to " & conBPM.DefaultDatabase
& " created successfully</B><p>"
else
Response.Write "Connection failed"
end if
strSQL = "INSERT INTO Orders (CustID,StockCode, StockDesc, Qty,
Price, Make, DateStamp) VALUES ('" & Session("strMyID") & "', "
strSQL = strSQL & "'" & Request.Form("StockCode") & "', "
strSQL = strSQL & "'" & Request.Form("StockDesc") & "', "
strSQL = strSQL & "'" & tmpQty & "', "
strSQL = strSQL & "'" & Request.Form("Price") & "', "
strSQL = strSQL & "'" & Request.Form("Make") & "', "
strSQL = strSQL & "#" & now & "#)"
response.write strSQL
if request.Form("Qty") > 0 then
Session("Sent") = False
conBPM.Execute(strSQL) << Line 42
end if
conBPM.Close
set conBPM = Nothing
End If
Response.Clear
Response.Redirect "order_frames.htm"
Response.End
Message #2 by Chris Neale <Chris.Neale@s...> on Fri, 15 Sep 2000 12:27:19 +0100
|
|
I'd guess that you've opened a recordset as adOpenStatic or something. Maybe
you're using the default, and now the server has changed the default has
changed to? Also, has the path to your connection.asp include changed?
Intermittent bugs are a pain. Sue the ISP. *grin*
Chris
Chaos! Panic! Disaster! (My work here is done)
Chris Neale. Web/Wap Developer
Chris.neale@s... <mailto:Chris.neale@s...>
www.sparkresponse.co.uk
-----Original Message-----
From: John Doolan [SMTP:Johnd@m...]
Sent: Friday, September 15, 2000 7:30 PM
To: ASP Databases
Subject: [asp_databases] Problem with updateable query after
website has been moved
Hi All,
This afternoon my website was moved from one server to
another by my
ISP and since then there has been an intermittent fault occurring
with the
error message:
Microsoft JET Database Engine error '80004005'
Operation must use an updateable query.
/addBasket.asp, line 42
Following on from other messages in the past I have asked the
administrator
to ensure that the IUSR account has full access to the database
files and
directory. I have also changed the code to ensure that the
connection
object is in mode 3 (see below). Are there any other reasons why
this may
be happening? The code worked absolutely fine before and the
administrator
assures me that IUSR has permissions. Is it possible (or likely)
that
permissions to any other users need to be granted? Is the
administrator
telling the truth? I am at my wits end!!
- John Doolan
*** Full Output to screen: ***
Qty = 5
btnAdd = Add
StockDesc = SE-C45 Compact Best Buy
StockCode = 1002
Make = SCOTCH
Price = 2.49
INSERT INTO Orders (CustID,StockCode, StockDesc, Qty, Price, Make,
DateStamp) VALUES ('PB4/28/00 4:18:08 PM194.126.64.49_0.9090387',
'1002',
'SE-C45 Compact Best Buy', '5', '2.49', 'SCOTCH', #9/14/00 9:40:15
PM#)
Microsoft JET Database Engine error '80004005'
Operation must use an updateable query.
/addBasket.asp, line 42
*** End of screen output ***
*** Full code listing ***
<%@ LANGUAGE=VBSCRIPT %>
<% Option Explicit %>
<% Response.Buffer = True %>
<!-- #INCLUDE FILE="Connection.asp" -->
<!-- METADATA TYPE="typelib" FILE="C:\Program Files\Common
Files\System\ado\msado15.dll" -->
<%
Dim objItem, conBPM, strMyID, strSQL, tmpQty, tmpDate
Response.Expires = 0
For Each objItem In Request.Form
Response.Write objItem & " = " & Request.Form(objItem) & "<BR>"
Next
If Session("StrMyID") <> "" and IsNumeric(Request.Form("Qty"))
Then
tmpQty = Request.Form("Qty")
tmpQty = Int(tmpQty)
Set conBPM = Server.CreateObject("ADODB.Connection")
conBPM.Mode = 3
conBPM.Open strConn
If ConBPM.State = adStateOpen Then
'Response.Write "<B>Connection to " &
conBPM.DefaultDatabase
& " created successfully</B><p>"
else
Response.Write "Connection failed"
end if
strSQL = "INSERT INTO Orders (CustID,StockCode, StockDesc,
Qty,
Price, Make, DateStamp) VALUES ('" & Session("strMyID") & "', "
strSQL = strSQL & "'" & Request.Form("StockCode") & "', "
strSQL = strSQL & "'" & Request.Form("StockDesc") & "', "
strSQL = strSQL & "'" & tmpQty & "', "
strSQL = strSQL & "'" & Request.Form("Price") & "', "
strSQL = strSQL & "'" & Request.Form("Make") & "', "
strSQL = strSQL & "#" & now & "#)"
response.write strSQL
if request.Form("Qty") > 0 then
Session("Sent") = False
conBPM.Execute(strSQL) << Line 42
end if
conBPM.Close
set conBPM = Nothing
End If
Response.Clear
Response.Redirect "order_frames.htm"
Response.End
Message #3 by "Ken Schaefer" <ken@a...> on Sat, 16 Sep 2000 00:46:41 +1000
|
|
I'd bet my bottom dollar that it's either:
a) a permissions problem with the IUSR_Computername account
b) your SQL statement is malformed - now, you say that the query worked
before, so possibly there is something different on your new server, eg the
new server stores dates in a different format (US vs UK for example)
c) ?? I'm stuck. I'd take the SQL statement that you've response.written,
and put it into the Access QBE. If there is a problem with the syntax, the
QBE (in SQL view mode) will highlight the point at which the error is
occurring).
Since you are just executing an SQL statement returning no records, your
cursor type is not relevant.
Cheers
Ken
----- Original Message -----
From: "John Doolan" <Johnd@m...>
To: "ASP Databases" <asp_databases@p...>
Sent: Saturday, September 16, 2000 4:29 AM
Subject: [asp_databases] Problem with updateable query after website has
been moved
> Hi All,
> This afternoon my website was moved from one server to another by my
> ISP and since then there has been an intermittent fault occurring with the
> error message:
> Microsoft JET Database Engine error '80004005'
>
> Operation must use an updateable query.
>
> /addBasket.asp, line 42
>
> Following on from other messages in the past I have asked the
administrator
> to ensure that the IUSR account has full access to the database files and
> directory. I have also changed the code to ensure that the connection
> object is in mode 3 (see below). Are there any other reasons why this may
> be happening? The code worked absolutely fine before and the
administrator
> assures me that IUSR has permissions. Is it possible (or likely) that
> permissions to any other users need to be granted? Is the administrator
> telling the truth? I am at my wits end!!
>
> - John Doolan
>
> *** Full Output to screen: ***
>
>
> Qty = 5
> btnAdd = Add
> StockDesc = SE-C45 Compact Best Buy
> StockCode = 1002
> Make = SCOTCH
> Price = 2.49
> INSERT INTO Orders (CustID,StockCode, StockDesc, Qty, Price, Make,
> DateStamp) VALUES ('PB4/28/00 4:18:08 PM194.126.64.49_0.9090387', '1002',
> 'SE-C45 Compact Best Buy', '5', '2.49', 'SCOTCH', #9/14/00 9:40:15 PM#)
> Microsoft JET Database Engine error '80004005'
>
> Operation must use an updateable query.
>
> /addBasket.asp, line 42
>
>
> *** End of screen output ***
>
> *** Full code listing ***
> <%@ LANGUAGE=VBSCRIPT %>
> <% Option Explicit %>
> <% Response.Buffer = True %>
> <!-- #INCLUDE FILE="Connection.asp" -->
> <!-- METADATA TYPE="typelib" FILE="C:\Program Files\Common
> Files\System\ado\msado15.dll" -->
>
> <%
> Dim objItem, conBPM, strMyID, strSQL, tmpQty, tmpDate
> Response.Expires = 0
> For Each objItem In Request.Form
> Response.Write objItem & " = " & Request.Form(objItem) & "<BR>"
> Next
>
> If Session("StrMyID") <> "" and IsNumeric(Request.Form("Qty")) Then
>
>
> tmpQty = Request.Form("Qty")
> tmpQty = Int(tmpQty)
>
> Set conBPM = Server.CreateObject("ADODB.Connection")
>
> conBPM.Mode = 3
> conBPM.Open strConn
>
> If ConBPM.State = adStateOpen Then
> 'Response.Write "<B>Connection to " & conBPM.DefaultDatabase
> & " created successfully</B><p>"
> else
> Response.Write "Connection failed"
> end if
>
>
> strSQL = "INSERT INTO Orders (CustID,StockCode, StockDesc, Qty,
> Price, Make, DateStamp) VALUES ('" & Session("strMyID") & "', "
> strSQL = strSQL & "'" & Request.Form("StockCode") & "', "
> strSQL = strSQL & "'" & Request.Form("StockDesc") & "', "
> strSQL = strSQL & "'" & tmpQty & "', "
> strSQL = strSQL & "'" & Request.Form("Price") & "', "
> strSQL = strSQL & "'" & Request.Form("Make") & "', "
> strSQL = strSQL & "#" & now & "#)"
> response.write strSQL
>
> if request.Form("Qty") > 0 then
> Session("Sent") = False
> conBPM.Execute(strSQL) << Line 42
> end if
>
> conBPM.Close
>
> set conBPM = Nothing
> End If
> Response.Clear
> Response.Redirect "order_frames.htm"
> Response.End
>
>
Message #4 by John Doolan <Johnd@m...> on Fri, 15 Sep 2000 16:02:35 +0100
|
|
Ken,
Right, I'm almost 100% certain now that it's permissions as I tried
to execute a very simple insert into a different database on the site (no
dates, only strings) and this failed with the same problem. I also used a
response.write to output the actual SQL statement and ran this successfully
in Access. What's frustrating is that I can only go on what I'm being told.
I'm going to try and use the filesystemObject to write a file into the
folder and see if that works.
- John Doolan
-----Original Message-----
From: Ken Schaefer [mailto:ken@a...]
Sent: 15 September 2000 15:47
To: ASP Databases
Subject: [asp_databases] Re: Problem with updateable query after website
has been moved
I'd bet my bottom dollar that it's either:
a) a permissions problem with the IUSR_Computername account
b) your SQL statement is malformed - now, you say that the query worked
before, so possibly there is something different on your new server, eg the
new server stores dates in a different format (US vs UK for example)
c) ?? I'm stuck. I'd take the SQL statement that you've response.written,
and put it into the Access QBE. If there is a problem with the syntax, the
QBE (in SQL view mode) will highlight the point at which the error is
occurring).
Since you are just executing an SQL statement returning no records, your
cursor type is not relevant.
Cheers
Ken
----- Original Message -----
From: "John Doolan" <Johnd@m...>
To: "ASP Databases" <asp_databases@p...>
Sent: Saturday, September 16, 2000 4:29 AM
Subject: [asp_databases] Problem with updateable query after website has
been moved
> Hi All,
> This afternoon my website was moved from one server to another by my
> ISP and since then there has been an intermittent fault occurring with the
> error message:
> Microsoft JET Database Engine error '80004005'
>
> Operation must use an updateable query.
>
> /addBasket.asp, line 42
>
> Following on from other messages in the past I have asked the
administrator
> to ensure that the IUSR account has full access to the database files and
> directory. I have also changed the code to ensure that the connection
> object is in mode 3 (see below). Are there any other reasons why this may
> be happening? The code worked absolutely fine before and the
administrator
> assures me that IUSR has permissions. Is it possible (or likely) that
> permissions to any other users need to be granted? Is the administrator
> telling the truth? I am at my wits end!!
>
> - John Doolan
>
> *** Full Output to screen: ***
>
>
> Qty = 5
> btnAdd = Add
> StockDesc = SE-C45 Compact Best Buy
> StockCode = 1002
> Make = SCOTCH
> Price = 2.49
> INSERT INTO Orders (CustID,StockCode, StockDesc, Qty, Price, Make,
> DateStamp) VALUES ('PB4/28/00 4:18:08 PM194.126.64.49_0.9090387', '1002',
> 'SE-C45 Compact Best Buy', '5', '2.49', 'SCOTCH', #9/14/00 9:40:15 PM#)
> Microsoft JET Database Engine error '80004005'
>
> Operation must use an updateable query.
>
> /addBasket.asp, line 42
>
>
> *** End of screen output ***
>
> *** Full code listing ***
> <%@ LANGUAGE=VBSCRIPT %>
> <% Option Explicit %>
> <% Response.Buffer = True %>
> <!-- #INCLUDE FILE="Connection.asp" -->
> <!-- METADATA TYPE="typelib" FILE="C:\Program Files\Common
> Files\System\ado\msado15.dll" -->
>
> <%
> Dim objItem, conBPM, strMyID, strSQL, tmpQty, tmpDate
> Response.Expires = 0
> For Each objItem In Request.Form
> Response.Write objItem & " = " & Request.Form(objItem) & "<BR>"
> Next
>
> If Session("StrMyID") <> "" and IsNumeric(Request.Form("Qty")) Then
>
>
> tmpQty = Request.Form("Qty")
> tmpQty = Int(tmpQty)
>
> Set conBPM = Server.CreateObject("ADODB.Connection")
>
> conBPM.Mode = 3
> conBPM.Open strConn
>
> If ConBPM.State = adStateOpen Then
> 'Response.Write "<B>Connection to " & conBPM.DefaultDatabase
> & " created successfully</B><p>"
> else
> Response.Write "Connection failed"
> end if
>
>
> strSQL = "INSERT INTO Orders (CustID,StockCode, StockDesc, Qty,
> Price, Make, DateStamp) VALUES ('" & Session("strMyID") & "', "
> strSQL = strSQL & "'" & Request.Form("StockCode") & "', "
> strSQL = strSQL & "'" & Request.Form("StockDesc") & "', "
> strSQL = strSQL & "'" & tmpQty & "', "
> strSQL = strSQL & "'" & Request.Form("Price") & "', "
> strSQL = strSQL & "'" & Request.Form("Make") & "', "
> strSQL = strSQL & "#" & now & "#)"
> response.write strSQL
>
> if request.Form("Qty") > 0 then
> Session("Sent") = False
> conBPM.Execute(strSQL) << Line 42
> end if
>
> conBPM.Close
>
> set conBPM = Nothing
> End If
> Response.Clear
> Response.Redirect "order_frames.htm"
> Response.End
>
>
|
|
 |