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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OLEDB.4.0 vs OLEDB.3.5.1 1

Status
Not open for further replies.

MstrMitch

Programmer
Oct 23, 2000
10
0
0
US
I got this script off another page and when I use it on my local PC it works fine..when I upload it
to a hosting service they are using OLEDB.4.0..the original line of code was

Set db = Server.CreateObject("ADODB.Connection")
db.Open "Provider=Microsoft.Jet.OLEDB.3.5.1;Data Source=" & strDBPath & ";"


so I changed that to:

Set db = Server.CreateObject("ADODB.Connection")
db.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & strDBPath & ";"

now I get an error that says:

Microsoft JET Database Engine error '80004005'

Operation must use an updateable query.

the following is the code that it is refering to..I have marked the line in which IE is saying is causing
that error:

does anyone know how to fix the "updateable query"


<%
mypath=request.servervariables(&quot;path_info&quot;)
myid=request.querystring(&quot;id&quot;)
if (myid=&quot;&quot;) then myid=0

***THIS LINE IS THE PROBLEM***

db.execute(&quot;update menu set menu_count=menu_count+1 where menu_id=&quot; &amp; myid)

' print hierarchy of linked menu titles
sub printlinkedmenus(menuid)
if (menuid >= 0) then
set rsmenu=db.execute(&quot;select * from menu where menu_id=&quot; &amp; menuid)
printlinkedmenus(rsmenu(&quot;menu_parent&quot;))
if (menuid > 0) then response.write(&quot; : &quot;)
str=&quot;<a href=&quot;&quot;&quot; &amp; mypath &amp; &quot;?id=&quot; &amp; menuid &amp; &quot;&quot;&quot; style=&quot;&quot;color:black; text-decoration:none;&quot;&quot; &quot;
str=str &amp; &quot;onMouseOver=&quot;&quot;self.status='&quot; &amp; decode(rsmenu(&quot;menu_title&quot;)) &amp; &quot;'; return true&quot;&quot; &quot;
str=str &amp; &quot;onMouseOut=&quot;&quot;self.status=''; return true&quot;&quot;>&quot;
str=str &amp; decode(rsmenu(&quot;menu_title&quot;)) &amp; &quot;</a>&quot;
response.write(str)
set rsmenu=nothing
end if
end sub

' print hierarchy of plain text menu titles
sub printmenus(menuid)
if (menuid >= 0) then
set rsmenu=db.execute(&quot;select * from menu where menu_id=&quot; &amp; menuid)
printmenus(rsmenu(&quot;menu_parent&quot;))
if (menuid > 0) then response.write(&quot; : &quot;)
response.write(decode(rsmenu(&quot;menu_title&quot;)))
set rsmenu=nothing
end if
end sub
%>
 
Hi MstrMich.. it' seems that we are cross interfering :+) I answered this question in EE, but I'll post here what I said there too.. if this works close the other question too

Hi MstrMich.. this is a permission issue.. give the IUSR write permission on the mdb file and it will
be solved..
..Hosting service you say.. contact then the web administrator there and tell them to give the anonymous
internet user write permission on the access database file (they'll know this issue)


your file have read permissions by default on the web server.. the administrator needs to change this manually..(I remember on UNIX it used to be done remotely)

rgrds Silvers5
As seen on EE
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top