Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A very strange error. 3

Status
Not open for further replies.

frOblivion

Programmer
Jan 2, 2001
14
US
OK, I have a view tracking system that submits info to my db everytime a page is loaded. If I try to browse through more than 2 or 3 pages on my site I get this error.

Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/includes/track_user.asp, line 32

I am doing this on my Win2000 platform with IIS. All of my SELECT operations with the database work fine. The INSERT statement even works fine, unless I browse through more than a couple pages.

Anyone seen this before?
Thanks
 
Cannot tell where exactly there is a problem in pages, as you have explained your problem. But it seems you need to check your SQL statements and their properties you set.

OR
Observe your way of browsing..if you get error after 2-3 pages, or when you browse a specific page, or when you follow a particular sequence of browsing. you may find that that specific page or the sequence of pages when you get error. Then go through all the pages looking and debbugging pages. I am sure you will find the error.

Thanks
 
"Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
/includes/track_user.asp, line 32"

Also it'd be extremely helful if you could post your track_user.asp or at least first 32 lines of it. ;) ---
---
 
Thanks For The Replies, here is the entire track_user.asp script

<%

Dim strRefer
Dim strRemoteIP
Dim strDate
DIm strTime
Dim strBrowser
Dim strOS
Dim strPage
Dim strExt
Dim trkSQL
Dim dbTrack

strRefer = Request.ServerVariables(&quot;HTTP_REFERER&quot;)
strRemoteIP = Request.ServerVariables(&quot;REMOTE_ADDR&quot;)
strDate = Date()
strTime = Time()
strBrowser = Get_BrowserType
strOS = Get_OSBrand
strPage = Request.ServerVariables(&quot;SCRIPT_NAME&quot;)
strExt = Request.ServerVariables(&quot;QUERY_STRING&quot;)

If strRefer = &quot;&quot; Then strRefer = &quot;Empty&quot;

trkSQL = &quot;INSERT INTO viewTrack (viewIP, viewDate, viewTime, viewPage, viewPageExt, viewBrowser, viewOS, viewRefer) &quot; &amp; _
&quot;VALUES ('&quot; &amp; strRemoteIP &amp; &quot;', '&quot; &amp; strDate &amp; &quot;', '&quot; &amp; strTime &amp; &quot;', '&quot; &amp; strPage &amp; &quot;', &quot; &amp; _
&quot;'&quot; &amp; strExt &amp; &quot;', '&quot; &amp; strBrowser &amp; &quot;', '&quot; &amp; strOS &amp; &quot;', '&quot; &amp; strRefer &amp; &quot;')&quot;

Set dbTrack = DB_OpenConnection

'On Error Resume Next
dbTrack.Execute(trkSQL)

dbTrack.Close
Set dbTrack = Nothing

'If err.number <> 0 Then
' Dim strErrNum
' Dim strErrDesc
'
' strErrNum = err.number
' strErrDesc = err.description
' strErrorLog = strErrNum &amp; &quot;, &quot; &amp; strErrDesc &amp; &quot;, &quot; &amp; strDate &amp; &quot;, &quot; &amp; strTime &amp; &quot;, &quot; &amp; strBrowser &amp; _
' &quot;, &quot; &amp; strOS &amp; &quot;, &quot; &amp; strRefer &amp; &quot;, &quot; &amp; strRemoteIP &amp; &quot;, &quot; &amp; strPage &amp; &quot;, &quot; &amp; strExt
' Call Log_Error(&quot;Tracking&quot;, strErrorLog)
'End If

Function Get_BrowserType()
Dim strBrowser

strBrowser = Request.ServerVariables(&quot;HTTP_USER_AGENT&quot;)
If InStr(strBrowser, &quot;MSIE&quot;) Then
strBrowser = &quot;MSIEv&quot; &amp; CInt(Mid(strBrowser, InStr(strBrowser, &quot;MSIE&quot;) + 5, 1))
ElseIf InStr(strBrowser, &quot;Mozilla&quot;) Then
If InStr(strBrowser, &quot;compatible&quot;) = 0 AND InStr(strBrowser, &quot;Opera&quot;) = 0 Then
strBrowser = &quot;Netscape&quot;
Else
strBrowser = &quot;Netscape Compatible&quot;
End If
Else
strBrowser = &quot;Unknown&quot;
End If
Get_BrowserType = strBrowser
End Function

Function Get_OSBrand()
Dim strOS

strOS = Request.ServerVariables(&quot;HTTP_USER_AGENT&quot;)
If InStr(strOS, &quot;Win&quot;) = 0 Then
strOS = &quot;Non-MS&quot;
Else
strOS = &quot;MS&quot;
End If

Get_OSBrand = strOS
End Function

'Function To Establish an Open Database Connection Object
Function DB_OpenConnection()
Dim objDB
Dim strDBString
Dim strDBFile
Dim strUser
Dim strPass

strDBFile = &quot;c:\Inetpub\ strDBString = &quot;DRIVER={Microsoft Access Driver (*.mdb)}; &quot;
strDBString = strDBString &amp; &quot;DBQ=&quot; &amp; strDBFile

Set objDB = Server.CreateObject(&quot;ADODB.Connection&quot;)
objDB.Open strDBString, &quot;Admin&quot;, &quot;pitfall&quot;

Set DB_OpenConnection = objDB
End Function

%>
 
I have seen this error message before and it was due to no server side write permissions being set for the database file.

Please would you let me know if this posting was helpful or otherwise - thank you

Jim
 
Thanks to all who posted. The resolution was this:

In the opening of my database connection,

Had to change this:
Set objDB = Server.CreateObject(&quot;ADODB.Connection&quot;)
objDB.Open strDBString, &quot;Admin&quot;, &quot;pitfall&quot;

To This:
Set objDB = Server.CreateObject(&quot;ADODB.Connection&quot;)
objDB.Mode = 3 'Open For Read/Write
objDB.Open strDBString, &quot;Admin&quot;, &quot;pitfall&quot;

Found it in the microsoft article posted by Nanda.

Thanks
L8r
fr0
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top