|
 |
access_asp thread: Error - Operation must use an updateable query. - Please Help
Message #1 by "Vítor Marinho" <vitor.marinho@n...> on Tue, 4 Jun 2002 12:54:56
|
|
Hi all,
I'm having a strange problem updating a database.
It gives me the folowing error:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an
updateable query.
/test.asp, line 10
My code in the page is:
<!-- #include file="include/adovbs.inc" -->
<%
Dim strSQL
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.Open "Turma4C"
strSQL = "UPDATE tblUtilizador SET UltimoAcesso = Now() WHERE
IDUtilizador = 107"
objConn.Execute strSQL, , adCmdText + adExecuteNoRecords
objConn.Close
Set objConn = Nothing
%>
I think it should work, cann anyone tell me why it doens't. The
connection to the database works, as if i do a recordset to retrive a
table it works, and i've tried it in a module in the access database and
it worked just fine. It just doen't work in asp.
Thanks for any help.
Vitor
Message #2 by "Darrell" <darrell@b...> on Wed, 5 Jun 2002 22:11:46
|
|
> Hi all,
> I'm having a strange problem updating a database.
I> t gives me the folowing error:
> Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[> Microsoft][ODBC Microsoft Access Driver] Operation must use an
u> pdateable query.
/> test.asp, line 10
> My code in the page is:
> <!-- #include file="include/adovbs.inc" -->
<> %
D> im strSQL
D> im objConn
> Set objConn = Server.CreateObject("ADODB.Connection")
o> bjConn.Open "Turma4C"
>
s> trSQL = "UPDATE tblUtilizador SET UltimoAcesso = Now() WHERE
I> DUtilizador = 107"
o> bjConn.Execute strSQL, , adCmdText + adExecuteNoRecords
> objConn.Close
S> et objConn = Nothing
%> >
> I think it should work, cann anyone tell me why it doens't. The
c> onnection to the database works, as if i do a recordset to retrive a
t> able it works, and i've tried it in a module in the access database
and
i> t worked just fine. It just doen't work in asp.
> Thanks for any help.
V> itor
Message #3 by "Darrell" <darrell@b...> on Wed, 5 Jun 2002 22:21:54
|
|
Sorry don't know what happened to my last message.
I have seen this before and it generally happens if the permissions for
the file are not set correctly. Set full permissions for "everyone" and
try it again.
HTH
Darrell
> > Hi all,
> > I'm having a strange problem updating a database.
I> > t gives me the folowing error:
> > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[> > Microsoft][ODBC Microsoft Access Driver] Operation must use an
u> > pdateable query.
/> > test.asp, line 10
> > My code in the page is:
> > <!-- #include file="include/adovbs.inc" -->
<> > %
D> > im strSQL
D> > im objConn
> > Set objConn = Server.CreateObject("ADODB.Connection")
o> > bjConn.Open "Turma4C"
> >
s> > trSQL = "UPDATE tblUtilizador SET UltimoAcesso = Now() WHERE
I> > DUtilizador = 107"
o> > bjConn.Execute strSQL, , adCmdText + adExecuteNoRecords
> > objConn.Close
S> > et objConn = Nothing
%> > >
> > I think it should work, cann anyone tell me why it doens't. The
c> > onnection to the database works, as if i do a recordset to retrive
a
t> > able it works, and i've tried it in a module in the access database
a> nd
i> > t worked just fine. It just doen't work in asp.
> > Thanks for any help.
V> > itor
Message #4 by "Teemu Keiski" <wroxhelp@m...> on Thu, 6 Jun 2002 08:17:10 +0300
|
|
I'm repeating myself from my earlier post (2 days ago).
When using Access and setting permissions for mdb file:
"Modify (Win 2000,Win XP) or Change
(WinNT) for IUSR_machinename should be enough. It's not good either but
it's less than Everyone/Full control.
It's because Access mdb file is physical file and when you are updating
db and so on, you are updating (changing in other words) the database
file so NT permissions should follow that."
Teemu Keiski
-----Original Message-----
From: Darrell [mailto:darrell@b...]
Sent: 5. kesäkuuta 2002 22:22
To: Access ASP
Subject: [access_asp] Re: Error - Operation must use an updateable
query. - Please Help
Sorry don't know what happened to my last message.
I have seen this before and it generally happens if the permissions for
the file are not set correctly. Set full permissions for "everyone" and
try it again.
HTH
Darrell
> > Hi all,
> > I'm having a strange problem updating a database.
I> > t gives me the folowing error:
> > Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[> > Microsoft][ODBC Microsoft Access Driver] Operation must use an
u> > pdateable query.
/> > test.asp, line 10
> > My code in the page is:
> > <!-- #include file="include/adovbs.inc" -->
<> > %
D> > im strSQL
D> > im objConn
> > Set objConn = Server.CreateObject("ADODB.Connection")
o> > bjConn.Open "Turma4C"
> >
s> > trSQL = "UPDATE tblUtilizador SET UltimoAcesso = Now() WHERE
I> > DUtilizador = 107"
o> > bjConn.Execute strSQL, , adCmdText + adExecuteNoRecords
> > objConn.Close
S> > et objConn = Nothing
%> > >
> > I think it should work, cann anyone tell me why it doens't. The
c> > onnection to the database works, as if i do a recordset to retrive
a
t> > able it works, and i've tried it in a module in the access database
a> nd
i> > t worked just fine. It just doen't work in asp.
> > Thanks for any help.
V> > itor
Message #5 by "Vítor Marinho" <vitor.marinho@n...> on Thu, 6 Jun 2002 10:44:01
|
|
Thanks for the info.
Now it works well, i've started to put my database file in the Shared
Documents folder in windows xp, and pointed there with an DSN connection.
Vitor Marinho
|
|
 |