Forums
This topic is locked
Code not working
28 Aug 2001 11:51:00 Bec C posted:
I am using the following code to issue an update command to a database record:set objDBConn = Server.CreateObject("ADODB.Connection"
strConn = MM_connIdiumCustomerDB_STRING
objDBConn.Open strConn
strCommandText = "SELECT username, password, loggedIn, loggedIndate FROM customers WHERE username = '" + Replace(rsUser__varUser, "'", "''" + "' AND password = '" + Replace(rsUser__varPassword, "'", "''" + "'"
'objDBConn.Execute strCommandText, , adCmdText
rsUser.Update "loggedIn", loggedInCount
rsUser.Update "loggedInDate", loggedInDate
But I get this error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/idium/login.asp, line 53
I have used the code on another site and it works fine. What could be the problem?
Replies
Replied 28 Aug 2001 15:28:27
28 Aug 2001 15:28:27 Viktor Farcic replied:
Maybe your DB is read only or has some other permission problem.
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I am using the following code to issue an update command to a database record:
set objDBConn = Server.CreateObject("ADODB.Connection"
strConn = MM_connIdiumCustomerDB_STRING
objDBConn.Open strConn
strCommandText = "SELECT username, password, loggedIn, loggedIndate FROM customers WHERE username = '" + Replace(rsUser__varUser, "'", "''" + "' AND password = '" + Replace(rsUser__varPassword, "'", "''" + "'"
'objDBConn.Execute strCommandText, , adCmdText
rsUser.Update "loggedIn", loggedInCount
rsUser.Update "loggedInDate", loggedInDate
But I get this error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/idium/login.asp, line 53
I have used the code on another site and it works fine. What could be the problem?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
I am using the following code to issue an update command to a database record:
set objDBConn = Server.CreateObject("ADODB.Connection"
strConn = MM_connIdiumCustomerDB_STRING
objDBConn.Open strConn
strCommandText = "SELECT username, password, loggedIn, loggedIndate FROM customers WHERE username = '" + Replace(rsUser__varUser, "'", "''" + "' AND password = '" + Replace(rsUser__varPassword, "'", "''" + "'"
'objDBConn.Execute strCommandText, , adCmdText
rsUser.Update "loggedIn", loggedInCount
rsUser.Update "loggedInDate", loggedInDate
But I get this error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/idium/login.asp, line 53
I have used the code on another site and it works fine. What could be the problem?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>