Ask a Question related to ASP Database, Design and Development.
-
Leo Lam #1
Cannot update database after moving website
Hi,
I got a problem on updating the database after moving the
website from my old computer to a new one. The old and
the new computers are running WindowsXP and the new
computer installed MDAC2.8 and Jet7.
Recently, I got 2 websites running on the new computer
and both of them having problem when updating the
database.
1: It saying that the database is write protected with
error code: Microsoft OLE DB Provider for ODBC Drivers
(0x80004005)
2: It saying that it needs an updating query for updating
the database with error code: Microsoft OLE DB Provider
for ODBC Drivers (0x80004005)
the code of the page are as following:
1:
<!-- #include file = "admin.inc" -->
<%
if request("todo") = "update" then
dim sqlstr
set adocon = server.createobject
("adodb.connection")
adocon.open application("db_driver") &
server.mappath(application("db_path"))
set rs = server.createobject
("adodb.recordset")
sqlstr = "SELECT * FROM " & request
("type") &"_mslist WHERE msid=" & request("unitid")
rs.open sqlstr, adocon, 1, 3
rs("msid") = request("msdev")
rs("num") = 1
rs("needdiff") = 0
rs.update
rs.close
set rs = nothing
adocon.close
set adocon = nothing
end if
%>
<!doctype html public "-//W3C//DTD HTML 4.0
Transitional//EN">
<html>
<head>
<meta content="text/html; charset=x-sjis" http-
equiv=Content-Type>
<title>G-Generation Prefect Profile - Add New
Formation</title>
<link type="text/css" rel="stylesheet" href="g-gen.css">
<script language="javascript">
function init()
{
opener.location.reload();
opener.focus();
self.close();
}
</script>
</head>
<body onload="init();">
</body>
</html>
2:
<!-- #include file = "doDisplay.inc" -->
<!doctype html public "-//W3C//DTD HTML 4.0
Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css"
type="text/css">
<link type="text/css" rel="stylesheet"
href="style.css">
<title>updating...</title>
<script language="javascript"
src="jscript.js"></script>
<script language="javascript"
src="popup.js"></script>
</head>
<body onload="resizeWin(widthWinBig,
heightWinBig);">
<form name='details' action='update.asp'
method='post'>
<input type='hidden' name='id'
value='<% = request("id")%>'>
<input type='hidden' name='name'
value='<% = request("name")%>'>
<input type='hidden' name='code'
value='<% = request("code")%>'>
<input type='hidden' name='media'
value='<% = request("media")%>'>
<input type='hidden'
name='remark' value='<% = request("remark")%>'>
<input type='hidden' name='todo'
value='byPass'>
</form>
<%
dim sqlstr
set adocon = server.createobject
("adodb.connection")
adocon.open application
("db_driver") & server.mappath(application("db_path"))
set rs = server.createobject
("adodb.recordset")
sqlstr = "SELECT * FROM cartoons
WHERE name='"&request("name")&"' AND id<>"&request("id")
rs.cursorlocation = 3
rs.open sqlstr, adocon, 3, 1
if rs.recordcount = 0 or request
("todo") = "byPass" then
doUpdate adocon
else
doDisplay rs
end if
rs.close
set rs = nothing
adocon.close
set adocon = nothing
sub doUpdate(adocon)
dim sqlstr
dim content
sqlstr="SELECT * FROM
cartoons WHERE id="&request("id")
set rs =
server.createobject("adodb.recordset")
rs.open sqlstr, adocon ,
0, 3
rs("name").value = request
("name")
rs("code").value = request
("code")
rs("media").value =
request("media")
rs("remark").value =
request("remark")
rs.update
content = "<script
language='javascript'>closeMe("&rs("id")&");</script>"
response.write content
end sub
%>
</body>
</html>
I am a newer to ASP, please help!!
Best,
Leo
..
Leo Lam Guest
-
Moving SQL Server database from localhost to remote?
Hello, I am doing my first project with MS SQL server 2000. Developing this with Access as a project has been fun.. but I am stumped now with how... -
Moving webblog to my website
How do I make a Comment box in a webpage? I have a webblog with a 'comment link' that opens a little box. I want to move the blog and the comment... -
Update website
The website http://www.photodevy.com is been updated. Greetings Devy -
moving a database from one server to another.
NT 4.0, IDS 7.3 Hi all I'm moving a small database (4gb) from one server to another as a favour to a mate. I'm savvy with IDS on Unix but have... -
moving a database from 7.1 to 8.1.2 via backup image file
I think the restore command does not recognize relative paths (./) ... Give the full path or I think omitting the from clause defaults to the... -
Tom Kaminski [MVP] #2
Re: Cannot update database after moving website
"Leo Lam" <bearforeverfriends@hotmail.com> wrote in message
news:12f401c3a879$9caabc10$a601280a@phx.gbl...[url]http://www.aspfaq.com/database.asp[/url]> Hi,
>
> I got a problem on updating the database after moving the
> website from my old computer to a new one. The old and
> the new computers are running WindowsXP and the new
> computer installed MDAC2.8 and Jet7.
>
> Recently, I got 2 websites running on the new computer
> and both of them having problem when updating the
> database.
>
> 1: It saying that the database is write protected with
> error code: Microsoft OLE DB Provider for ODBC Drivers
> (0x80004005)
>
> 2: It saying that it needs an updating query for updating
> the database with error code: Microsoft OLE DB Provider
> for ODBC Drivers (0x80004005)
--
Tom Kaminski IIS MVP
[url]http://www.iistoolshed.com/[/url] - tools, scripts, and utilities for running IIS
[url]http://mvp.support.microsoft.com/[/url]
[url]http://www.microsoft.com/windowsserver2003/community/centers/iis/[/url]
Tom Kaminski [MVP] Guest
-
Martin Honnen #3
Re: Cannot update database after moving website
Leo Lam wrote:Well, is the database write protected?> I got a problem on updating the database after moving the
> website from my old computer to a new one. The old and
> the new computers are running WindowsXP and the new
> computer installed MDAC2.8 and Jet7.
>
> Recently, I got 2 websites running on the new computer
> and both of them having problem when updating the
> database.
>
> 1: It saying that the database is write protected with
> error code: Microsoft OLE DB Provider for ODBC Drivers
> (0x80004005)
I think this occurs if the Windows XP user under which ASP pages are> 2: It saying that it needs an updating query for updating
> the database with error code: Microsoft OLE DB Provider
> for ODBC Drivers (0x80004005)
executed doesn't have access to the data base. Make sure that the user
IUSR_hostname has the proper access to the directory the data base is
in. Perhaps move the data base somewhere where you want ASP pages to
have access to.
--
Martin Honnen
[url]http://JavaScript.FAQTs.com/[/url]
Martin Honnen Guest
-
Leo Lam #4
Re: Cannot update database after moving website
Yes, it is because of the access right of the
IUSR_hostname.
I have try to change its group to administrators and the
websites work again. But it is dangerous to do so.
Do you know anyway to change the folder permission such
that IUSR_hostname has write permission on that folder.
I found no way to do so.
Best,
Leo
the>-----Original Message-----
>
>
>Leo Lam wrote:>> I got a problem on updating the database after movingupdating>>> website from my old computer to a new one. The old and
>> the new computers are running WindowsXP and the new
>> computer installed MDAC2.8 and Jet7.
>>
>> Recently, I got 2 websites running on the new computer
>> and both of them having problem when updating the
>> database.
>>
>> 1: It saying that the database is write protected with
>> error code: Microsoft OLE DB Provider for ODBC Drivers
>> (0x80004005)
>Well, is the database write protected?
>>> 2: It saying that it needs an updating query forProvider>> the database with error code: Microsoft OLE DBASP pages are>>> for ODBC Drivers (0x80004005)
>I think this occurs if the Windows XP user under whichthat the user>executed doesn't have access to the data base. Make suredata base is>IUSR_hostname has the proper access to the directory theASP pages to>in. Perhaps move the data base somewhere where you want>have access to.
>
>--
>
> Martin Honnen
> [url]http://JavaScript.FAQTs.com/[/url]
>
>.
>Leo Lam Guest
-
Martin Honnen #5
Re: Cannot update database after moving website
Leo Lam wrote:
With Windows Explorer, you right-click the folder, use properties and> Yes, it is because of the access right of the
> IUSR_hostname.
>
> I have try to change its group to administrators and the
> websites work again. But it is dangerous to do so.
>
> Do you know anyway to change the folder permission such
> that IUSR_hostname has write permission on that folder.
> I found no way to do so.
security, there you can set user rights. At least that is how I do it
with Windows XP Professional.
--
Martin Honnen
[url]http://JavaScript.FAQTs.com/[/url]
Martin Honnen Guest
-
Leo Lam #6
Re: Cannot update database after moving website
Thanks, Martin.
I solve this problem now.
WinXP will hide the security option orginally and I need
to enable it again in the Folder option.
Leo
the>-----Original Message-----
>
>
>Leo Lam wrote:
>>> Yes, it is because of the access right of the
>> IUSR_hostname.
>>
>> I have try to change its group to administrators andsuch>> websites work again. But it is dangerous to do so.
>>
>> Do you know anyway to change the folder permissionproperties and>>> that IUSR_hostname has write permission on that folder.
>> I found no way to do so.
>With Windows Explorer, you right-click the folder, useis how I do it>security, there you can set user rights. At least that>with Windows XP Professional.
>
>--
>
> Martin Honnen
> [url]http://JavaScript.FAQTs.com/[/url]
>
>.
>Leo Lam Guest



Reply With Quote

