473,387 Members | 1,904 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

IIS5 > IIS6 Aspx pages with MSAccess dbs no longer working

Our webhost (www.usbusinessweb.net) had a W2K IIS5 server crash after a
scheduled hard-boot occurred during a ms-security patch install overnight.
They couldn't get the server working again so they transferred our site
www.orbisoft.com to a new W2003 IIS6 server they set up.

That was a week ago.

Since that transfer, all of our ASPX pages that use Access2000 databases
have stopped working.

Our main one is our "buy" page at
http://www.orbisoft.com/products/tas...t-version.aspx
which means potential customers can't purchase there.

I have shown the error below which essentially says "Cannot update. Database
or object is read-only."

After numerous assurances from our webhost that they have set anonymous user
write access for both the /fpdb folder and the individual databases we still
get the same error. They say it is our fault in that there is something in
our code that isn't right. They say the have another user where their aspx
pages with MSAccess are working. I said "but all aspx pages were working
fine on IIS5...."

"Line 211: rs.addnew" below is the where the error is highlighted.

The actual relevant code snip-it is as follows with the runtime error listed
below that. You also are welcome to test the page at
http://www.orbisoft.com/products/tas...t-version.aspx
with a junk order too - I won't hold you to it:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

<%@Page aspcompat=true Language = VB Debug="true"%>
<%@Import Namespace="aspNetEmail"%>
<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.OleDb"%>
<%@Import Namespace="aspNetMX"%>
<%@Import Namespace="System.Globalization"%>

<script language="VB" runat="server">

Dim strFirstName as String
Dim strLastName as String
Dim strExisting as String
Dim strNumberUsers as String
Dim strCompany as String
Dim strTitle as String
Dim strEmailAddress as String
Dim strAddress as String
Dim strCity as String
Dim strState as String
Dim strZip as String
Dim strCountry as String
Dim strTelephone as String
Dim strIndustry as String
Dim strOtherIndustry as String
Dim strWHSpecific as String
Dim strComment as String
Dim strPromoCode as String
Dim strProductName as String
Dim dblQuantity as Double
Dim dblProductPrice as Double
Dim dblExtension as Double
Dim dblPromotionalCodeSavings as Double
Dim dblTotalUSD as Double
Public Function strProper(strRaw as String) As String
Dim currentTextInfo
currentTextInfo = CultureInfo.CurrentCulture.TextInfo
strProper = currentTextInfo.ToTitleCase(strRaw)
End Function

Function bolStoreEntries()
'Store entries temporarily for populating after validation fail
'************************************************* *************
strFirstName = Request("FirstName")
strLastName = Request("LastName")
strExisting = "No"
strNumberUsers = Request("NumberUsers")
strCompany = Request("Company")
strTitle = Request("Title")
strEmailAddress = Request("EmailAddress")
strAddress = Request("Address")
strCity = Request("City")
strState = Request("State")
strZip = Request("Zip")
strCountry = Request("Country")
strTelephone = Request("Telephone")
strIndustry = Request("Industry")
strOtherIndustry = Request("OtherIndustry")
strWHSpecific = Request("WhereHeard")
strComment = Request("Comment")
End Function
</script>
<%
Dim bolErr as Boolean
bolStoreEntries
fCalculatePrices
If Request("OrderNow") <> "" Then

'Save to database
'****************
Dim strHTML as String
Dim strlf as String
Dim strS1 as String
Dim strS2 as String
Dim strS3 as String
Dim strErr as String
Dim bSuccess as Boolean
Dim sPath as String
Dim conn
Dim rs
Dim lngInvoiceNumber as Long
Dim lngInvoiceReference as Long

sPath = "D:\inetpub\www\orbisoft\fpdb\dbOnlineOrders.m db"

conn = Server.CreateObject("ADODB.Connection")
conn.open ("Provider=Microsoft.Jet.OLEDB.4.0;" & "Persist Security
Info=TRUE;" & "Data Source=" & sPath, "Admin", "")
rs = server.createobject("adodb.recordset")
rs.open ("tblOrders", conn, 2, 2)
rs.addnew

if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
if Request("LastName") <> "" then rs("LastName")=
strProper(Request("LastName"))

etc...



And here's the error it now gives (falling over on the 211 rs.addnew line):

Server Error in '/' Application.

Cannot update. Database or object is read-only.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Cannot
update. Database or object is read-only.

Source Error:

Line 209: rs.open ("tblOrders", conn, 2, 2)
Line 210:
Line 211: rs.addnew
Line 212:
Line 213: if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
Source File:
D:\Inetpub\www\orbisoft\products\taskmanager\2005\ purchase\order-details.asp
x Line: 211

Stack Trace:

[COMException (0x80040e09): Cannot update. Database or object is
read-only.]

Microsoft.VisualBasic.CompilerServices.LateBinding .InternalLateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack, Boolean IgnoreReturn) +798
Microsoft.VisualBasic.CompilerServices.LateBinding .LateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack) +23
ASP.order_details_aspx.__Render__control1(HtmlText Writer __output,
Control parameterContainer) in
D:\Inetpub\www\orbisoft\products\taskmanager\2005\ purchase\order-details.asp
x:211
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1926
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET
Version:1.1.4322.2300
Any ideas very much appreciated ....

Mark



Nov 21 '05 #1
8 1328
Hi,

Try enclosing rs.addnew is a try catch block to get a better
error message. Sql server is much better for the web than access. MSDE is
a free version of sql server.

Try
rs.addnew
catch ex as exception
Response.write(ex.tostring)
end try

http://www.microsoft.com/downloads/d...displaylang=en

Ken
---------------------
"Mark B" <mb*******@Delete-All-X-XorbisofXXt.com> wrote in message
news:eV*************@TK2MSFTNGP09.phx.gbl...
Our webhost (www.usbusinessweb.net) had a W2K IIS5 server crash after a
scheduled hard-boot occurred during a ms-security patch install overnight.
They couldn't get the server working again so they transferred our site
www.orbisoft.com to a new W2003 IIS6 server they set up.

That was a week ago.

Since that transfer, all of our ASPX pages that use Access2000 databases
have stopped working.

Our main one is our "buy" page at
http://www.orbisoft.com/products/tas...t-version.aspx
which means potential customers can't purchase there.

I have shown the error below which essentially says "Cannot update. Database
or object is read-only."

After numerous assurances from our webhost that they have set anonymous user
write access for both the /fpdb folder and the individual databases we still
get the same error. They say it is our fault in that there is something in
our code that isn't right. They say the have another user where their aspx
pages with MSAccess are working. I said "but all aspx pages were working
fine on IIS5...."

"Line 211: rs.addnew" below is the where the error is highlighted.

The actual relevant code snip-it is as follows with the runtime error listed
below that. You also are welcome to test the page at
http://www.orbisoft.com/products/tas...t-version.aspx
with a junk order too - I won't hold you to it:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

<%@Page aspcompat=true Language = VB Debug="true"%>
<%@Import Namespace="aspNetEmail"%>
<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.OleDb"%>
<%@Import Namespace="aspNetMX"%>
<%@Import Namespace="System.Globalization"%>

<script language="VB" runat="server">

Dim strFirstName as String
Dim strLastName as String
Dim strExisting as String
Dim strNumberUsers as String
Dim strCompany as String
Dim strTitle as String
Dim strEmailAddress as String
Dim strAddress as String
Dim strCity as String
Dim strState as String
Dim strZip as String
Dim strCountry as String
Dim strTelephone as String
Dim strIndustry as String
Dim strOtherIndustry as String
Dim strWHSpecific as String
Dim strComment as String
Dim strPromoCode as String
Dim strProductName as String
Dim dblQuantity as Double
Dim dblProductPrice as Double
Dim dblExtension as Double
Dim dblPromotionalCodeSavings as Double
Dim dblTotalUSD as Double
Public Function strProper(strRaw as String) As String
Dim currentTextInfo
currentTextInfo = CultureInfo.CurrentCulture.TextInfo
strProper = currentTextInfo.ToTitleCase(strRaw)
End Function

Function bolStoreEntries()
'Store entries temporarily for populating after validation fail
'************************************************* *************
strFirstName = Request("FirstName")
strLastName = Request("LastName")
strExisting = "No"
strNumberUsers = Request("NumberUsers")
strCompany = Request("Company")
strTitle = Request("Title")
strEmailAddress = Request("EmailAddress")
strAddress = Request("Address")
strCity = Request("City")
strState = Request("State")
strZip = Request("Zip")
strCountry = Request("Country")
strTelephone = Request("Telephone")
strIndustry = Request("Industry")
strOtherIndustry = Request("OtherIndustry")
strWHSpecific = Request("WhereHeard")
strComment = Request("Comment")
End Function
</script>
<%
Dim bolErr as Boolean
bolStoreEntries
fCalculatePrices
If Request("OrderNow") <> "" Then

'Save to database
'****************
Dim strHTML as String
Dim strlf as String
Dim strS1 as String
Dim strS2 as String
Dim strS3 as String
Dim strErr as String
Dim bSuccess as Boolean
Dim sPath as String
Dim conn
Dim rs
Dim lngInvoiceNumber as Long
Dim lngInvoiceReference as Long

sPath = "D:\inetpub\www\orbisoft\fpdb\dbOnlineOrders.m db"

conn = Server.CreateObject("ADODB.Connection")
conn.open ("Provider=Microsoft.Jet.OLEDB.4.0;" & "Persist Security
Info=TRUE;" & "Data Source=" & sPath, "Admin", "")
rs = server.createobject("adodb.recordset")
rs.open ("tblOrders", conn, 2, 2)
rs.addnew

if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
if Request("LastName") <> "" then rs("LastName")=
strProper(Request("LastName"))

etc...



And here's the error it now gives (falling over on the 211 rs.addnew line):

Server Error in '/' Application.

Cannot update. Database or object is read-only.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Cannot
update. Database or object is read-only.

Source Error:

Line 209: rs.open ("tblOrders", conn, 2, 2)
Line 210:
Line 211: rs.addnew
Line 212:
Line 213: if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
Source File:
D:\Inetpub\www\orbisoft\products\taskmanager\2005\ purchase\order-details.asp
x Line: 211

Stack Trace:

[COMException (0x80040e09): Cannot update. Database or object is
read-only.]

Microsoft.VisualBasic.CompilerServices.LateBinding .InternalLateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack, Boolean IgnoreReturn) +798
Microsoft.VisualBasic.CompilerServices.LateBinding .LateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack) +23
ASP.order_details_aspx.__Render__control1(HtmlText Writer __output,
Control parameterContainer) in
D:\Inetpub\www\orbisoft\products\taskmanager\2005\ purchase\order-details.asp
x:211
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1926
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET
Version:1.1.4322.2300
Any ideas very much appreciated ....

Mark


Nov 21 '05 #2
I did that and it didn't catch the rs.addnew error -- it just breezed
through it and then gave the same error but for the next statement:

Line 222: if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))

Server Error in '/' Application.

Cannot update. Database or object is read-only.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Cannot
update. Database or object is read-only.

Source Error:

Line 221:
Line 222: if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
Line 223: if Request("LastName") <> "" then rs("LastName")=
strProper(Request("LastName"))
Line 224: if Request("Company") <> "" then rs("Organization")=
Request("Company")




"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OV**************@tk2msftngp13.phx.gbl...
Hi,

Try enclosing rs.addnew is a try catch block to get a better error message. Sql server is much better for the web than access. MSDE is a free version of sql server.

Try
rs.addnew
catch ex as exception
Response.write(ex.tostring)
end try

http://www.microsoft.com/downloads/d...displaylang=en
Ken
---------------------
"Mark B" <mb*******@Delete-All-X-XorbisofXXt.com> wrote in message
news:eV*************@TK2MSFTNGP09.phx.gbl...
Our webhost (www.usbusinessweb.net) had a W2K IIS5 server crash after a
scheduled hard-boot occurred during a ms-security patch install overnight.
They couldn't get the server working again so they transferred our site
www.orbisoft.com to a new W2003 IIS6 server they set up.

That was a week ago.

Since that transfer, all of our ASPX pages that use Access2000 databases
have stopped working.

Our main one is our "buy" page at
http://www.orbisoft.com/products/tas...t-version.aspx which means potential customers can't purchase there.

I have shown the error below which essentially says "Cannot update. Database or object is read-only."

After numerous assurances from our webhost that they have set anonymous user write access for both the /fpdb folder and the individual databases we still get the same error. They say it is our fault in that there is something in
our code that isn't right. They say the have another user where their aspx
pages with MSAccess are working. I said "but all aspx pages were working
fine on IIS5...."

"Line 211: rs.addnew" below is the where the error is highlighted.

The actual relevant code snip-it is as follows with the runtime error listed below that. You also are welcome to test the page at
http://www.orbisoft.com/products/tas...t-version.aspx with a junk order too - I won't hold you to it:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

<%@Page aspcompat=true Language = VB Debug="true"%>
<%@Import Namespace="aspNetEmail"%>
<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.OleDb"%>
<%@Import Namespace="aspNetMX"%>
<%@Import Namespace="System.Globalization"%>

<script language="VB" runat="server">

Dim strFirstName as String
Dim strLastName as String
Dim strExisting as String
Dim strNumberUsers as String
Dim strCompany as String
Dim strTitle as String
Dim strEmailAddress as String
Dim strAddress as String
Dim strCity as String
Dim strState as String
Dim strZip as String
Dim strCountry as String
Dim strTelephone as String
Dim strIndustry as String
Dim strOtherIndustry as String
Dim strWHSpecific as String
Dim strComment as String
Dim strPromoCode as String
Dim strProductName as String
Dim dblQuantity as Double
Dim dblProductPrice as Double
Dim dblExtension as Double
Dim dblPromotionalCodeSavings as Double
Dim dblTotalUSD as Double
Public Function strProper(strRaw as String) As String
Dim currentTextInfo
currentTextInfo = CultureInfo.CurrentCulture.TextInfo
strProper = currentTextInfo.ToTitleCase(strRaw)
End Function

Function bolStoreEntries()
'Store entries temporarily for populating after validation fail
'************************************************* *************
strFirstName = Request("FirstName")
strLastName = Request("LastName")
strExisting = "No"
strNumberUsers = Request("NumberUsers")
strCompany = Request("Company")
strTitle = Request("Title")
strEmailAddress = Request("EmailAddress")
strAddress = Request("Address")
strCity = Request("City")
strState = Request("State")
strZip = Request("Zip")
strCountry = Request("Country")
strTelephone = Request("Telephone")
strIndustry = Request("Industry")
strOtherIndustry = Request("OtherIndustry")
strWHSpecific = Request("WhereHeard")
strComment = Request("Comment")
End Function
</script>
<%
Dim bolErr as Boolean
bolStoreEntries
fCalculatePrices
If Request("OrderNow") <> "" Then

'Save to database
'****************
Dim strHTML as String
Dim strlf as String
Dim strS1 as String
Dim strS2 as String
Dim strS3 as String
Dim strErr as String
Dim bSuccess as Boolean
Dim sPath as String
Dim conn
Dim rs
Dim lngInvoiceNumber as Long
Dim lngInvoiceReference as Long

sPath = "D:\inetpub\www\orbisoft\fpdb\dbOnlineOrders.m db"

conn = Server.CreateObject("ADODB.Connection")
conn.open ("Provider=Microsoft.Jet.OLEDB.4.0;" & "Persist Security
Info=TRUE;" & "Data Source=" & sPath, "Admin", "")
rs = server.createobject("adodb.recordset")
rs.open ("tblOrders", conn, 2, 2)
rs.addnew

if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
if Request("LastName") <> "" then rs("LastName")=
strProper(Request("LastName"))

etc...



And here's the error it now gives (falling over on the 211 rs.addnew line):
Server Error in '/' Application.

Cannot update. Database or object is read-only.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Cannot
update. Database or object is read-only.

Source Error:

Line 209: rs.open ("tblOrders", conn, 2, 2)
Line 210:
Line 211: rs.addnew
Line 212:
Line 213: if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
Source File:
D:\Inetpub\www\orbisoft\products\taskmanager\2005\ purchase\order-details.asp x Line: 211

Stack Trace:

[COMException (0x80040e09): Cannot update. Database or object is
read-only.]

Microsoft.VisualBasic.CompilerServices.LateBinding .InternalLateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn) +798
Microsoft.VisualBasic.CompilerServices.LateBinding .LateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack) +23
ASP.order_details_aspx.__Render__control1(HtmlText Writer __output,
Control parameterContainer) in
D:\Inetpub\www\orbisoft\products\taskmanager\2005\ purchase\order-details.asp x:211
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1926
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300
Any ideas very much appreciated ....

Mark



Nov 21 '05 #3
MarkB i have had also such experience using MS ACCESS!!
If possible try using SQLServer as Ken adviced..
I would hint you with some fixes...
1) Have you given the MS ACCESS files the right permission make sure the you
give the ASPNET acct permission
Or even if possible the the FOLDERS where the MDB files exist.(Give it
write, read etc..
2)Whenever you open and MDB file is sometimes locks it and creates a LDF
file if i can remember
3)With Win2003 i think you have to give the FOLDER or your MDB files the
Network service acct the right permission look ath this blog for that
http://forums.asp.net/869604/ShowPost.aspx
Hope that helps
Patrick


"Mark B" <mb*******@Delete-All-X-XorbisofXXt.com> wrote in message
news:eV*************@TK2MSFTNGP09.phx.gbl...
Our webhost (www.usbusinessweb.net) had a W2K IIS5 server crash after a
scheduled hard-boot occurred during a ms-security patch install overnight.
They couldn't get the server working again so they transferred our site
www.orbisoft.com to a new W2003 IIS6 server they set up.

That was a week ago.

Since that transfer, all of our ASPX pages that use Access2000 databases
have stopped working.

Our main one is our "buy" page at
http://www.orbisoft.com/products/tas...t-version.aspx which means potential customers can't purchase there.

I have shown the error below which essentially says "Cannot update. Database or object is read-only."

After numerous assurances from our webhost that they have set anonymous user write access for both the /fpdb folder and the individual databases we still get the same error. They say it is our fault in that there is something in
our code that isn't right. They say the have another user where their aspx
pages with MSAccess are working. I said "but all aspx pages were working
fine on IIS5...."

"Line 211: rs.addnew" below is the where the error is highlighted.

The actual relevant code snip-it is as follows with the runtime error listed below that. You also are welcome to test the page at
http://www.orbisoft.com/products/tas...t-version.aspx with a junk order too - I won't hold you to it:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

<%@Page aspcompat=true Language = VB Debug="true"%>
<%@Import Namespace="aspNetEmail"%>
<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.OleDb"%>
<%@Import Namespace="aspNetMX"%>
<%@Import Namespace="System.Globalization"%>

<script language="VB" runat="server">

Dim strFirstName as String
Dim strLastName as String
Dim strExisting as String
Dim strNumberUsers as String
Dim strCompany as String
Dim strTitle as String
Dim strEmailAddress as String
Dim strAddress as String
Dim strCity as String
Dim strState as String
Dim strZip as String
Dim strCountry as String
Dim strTelephone as String
Dim strIndustry as String
Dim strOtherIndustry as String
Dim strWHSpecific as String
Dim strComment as String
Dim strPromoCode as String
Dim strProductName as String
Dim dblQuantity as Double
Dim dblProductPrice as Double
Dim dblExtension as Double
Dim dblPromotionalCodeSavings as Double
Dim dblTotalUSD as Double
Public Function strProper(strRaw as String) As String
Dim currentTextInfo
currentTextInfo = CultureInfo.CurrentCulture.TextInfo
strProper = currentTextInfo.ToTitleCase(strRaw)
End Function

Function bolStoreEntries()
'Store entries temporarily for populating after validation fail
'************************************************* *************
strFirstName = Request("FirstName")
strLastName = Request("LastName")
strExisting = "No"
strNumberUsers = Request("NumberUsers")
strCompany = Request("Company")
strTitle = Request("Title")
strEmailAddress = Request("EmailAddress")
strAddress = Request("Address")
strCity = Request("City")
strState = Request("State")
strZip = Request("Zip")
strCountry = Request("Country")
strTelephone = Request("Telephone")
strIndustry = Request("Industry")
strOtherIndustry = Request("OtherIndustry")
strWHSpecific = Request("WhereHeard")
strComment = Request("Comment")
End Function
</script>
<%
Dim bolErr as Boolean
bolStoreEntries
fCalculatePrices
If Request("OrderNow") <> "" Then

'Save to database
'****************
Dim strHTML as String
Dim strlf as String
Dim strS1 as String
Dim strS2 as String
Dim strS3 as String
Dim strErr as String
Dim bSuccess as Boolean
Dim sPath as String
Dim conn
Dim rs
Dim lngInvoiceNumber as Long
Dim lngInvoiceReference as Long

sPath = "D:\inetpub\www\orbisoft\fpdb\dbOnlineOrders.m db"

conn = Server.CreateObject("ADODB.Connection")
conn.open ("Provider=Microsoft.Jet.OLEDB.4.0;" & "Persist Security
Info=TRUE;" & "Data Source=" & sPath, "Admin", "")
rs = server.createobject("adodb.recordset")
rs.open ("tblOrders", conn, 2, 2)
rs.addnew

if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
if Request("LastName") <> "" then rs("LastName")=
strProper(Request("LastName"))

etc...



And here's the error it now gives (falling over on the 211 rs.addnew line):
Server Error in '/' Application.

Cannot update. Database or object is read-only.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Cannot
update. Database or object is read-only.

Source Error:

Line 209: rs.open ("tblOrders", conn, 2, 2)
Line 210:
Line 211: rs.addnew
Line 212:
Line 213: if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
Source File:
D:\Inetpub\www\orbisoft\products\taskmanager\2005\ purchase\order-details.asp x Line: 211

Stack Trace:

[COMException (0x80040e09): Cannot update. Database or object is
read-only.]

Microsoft.VisualBasic.CompilerServices.LateBinding .InternalLateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn) +798
Microsoft.VisualBasic.CompilerServices.LateBinding .LateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack) +23
ASP.order_details_aspx.__Render__control1(HtmlText Writer __output,
Control parameterContainer) in
D:\Inetpub\www\orbisoft\products\taskmanager\2005\ purchase\order-details.asp x:211
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1926
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300
Any ideas very much appreciated ....

Mark


Nov 21 '05 #4
Hi,

Any way you could update you code to use ado.net instead of ado?

Ken
----------------
"Mark B" <mb*******@Delete-All-X-XorbisofXXt.com> wrote in message
news:ue*************@TK2MSFTNGP09.phx.gbl...
I did that and it didn't catch the rs.addnew error -- it just breezed
through it and then gave the same error but for the next statement:

Line 222: if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))

Server Error in '/' Application.

Cannot update. Database or object is read-only.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Cannot
update. Database or object is read-only.

Source Error:

Line 221:
Line 222: if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
Line 223: if Request("LastName") <> "" then rs("LastName")=
strProper(Request("LastName"))
Line 224: if Request("Company") <> "" then rs("Organization")=
Request("Company")




"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OV**************@tk2msftngp13.phx.gbl...
Hi,

Try enclosing rs.addnew is a try catch block to get a better error message. Sql server is much better for the web than access. MSDE is a free version of sql server.

Try
rs.addnew
catch ex as exception
Response.write(ex.tostring)
end try

http://www.microsoft.com/downloads/d...displaylang=en
Ken
---------------------
"Mark B" <mb*******@Delete-All-X-XorbisofXXt.com> wrote in message
news:eV*************@TK2MSFTNGP09.phx.gbl...
Our webhost (www.usbusinessweb.net) had a W2K IIS5 server crash after a
scheduled hard-boot occurred during a ms-security patch install overnight.
They couldn't get the server working again so they transferred our site
www.orbisoft.com to a new W2003 IIS6 server they set up.

That was a week ago.

Since that transfer, all of our ASPX pages that use Access2000 databases
have stopped working.

Our main one is our "buy" page at
http://www.orbisoft.com/products/tas...t-version.aspx which means potential customers can't purchase there.

I have shown the error below which essentially says "Cannot update. Database or object is read-only."

After numerous assurances from our webhost that they have set anonymous user write access for both the /fpdb folder and the individual databases we still get the same error. They say it is our fault in that there is something in
our code that isn't right. They say the have another user where their aspx
pages with MSAccess are working. I said "but all aspx pages were working
fine on IIS5...."

"Line 211: rs.addnew" below is the where the error is highlighted.

The actual relevant code snip-it is as follows with the runtime error listed below that. You also are welcome to test the page at
http://www.orbisoft.com/products/tas...t-version.aspx with a junk order too - I won't hold you to it:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

<%@Page aspcompat=true Language = VB Debug="true"%>
<%@Import Namespace="aspNetEmail"%>
<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.OleDb"%>
<%@Import Namespace="aspNetMX"%>
<%@Import Namespace="System.Globalization"%>

<script language="VB" runat="server">

Dim strFirstName as String
Dim strLastName as String
Dim strExisting as String
Dim strNumberUsers as String
Dim strCompany as String
Dim strTitle as String
Dim strEmailAddress as String
Dim strAddress as String
Dim strCity as String
Dim strState as String
Dim strZip as String
Dim strCountry as String
Dim strTelephone as String
Dim strIndustry as String
Dim strOtherIndustry as String
Dim strWHSpecific as String
Dim strComment as String
Dim strPromoCode as String
Dim strProductName as String
Dim dblQuantity as Double
Dim dblProductPrice as Double
Dim dblExtension as Double
Dim dblPromotionalCodeSavings as Double
Dim dblTotalUSD as Double
Public Function strProper(strRaw as String) As String
Dim currentTextInfo
currentTextInfo = CultureInfo.CurrentCulture.TextInfo
strProper = currentTextInfo.ToTitleCase(strRaw)
End Function

Function bolStoreEntries()
'Store entries temporarily for populating after validation fail
'************************************************* *************
strFirstName = Request("FirstName")
strLastName = Request("LastName")
strExisting = "No"
strNumberUsers = Request("NumberUsers")
strCompany = Request("Company")
strTitle = Request("Title")
strEmailAddress = Request("EmailAddress")
strAddress = Request("Address")
strCity = Request("City")
strState = Request("State")
strZip = Request("Zip")
strCountry = Request("Country")
strTelephone = Request("Telephone")
strIndustry = Request("Industry")
strOtherIndustry = Request("OtherIndustry")
strWHSpecific = Request("WhereHeard")
strComment = Request("Comment")
End Function
</script>
<%
Dim bolErr as Boolean
bolStoreEntries
fCalculatePrices
If Request("OrderNow") <> "" Then

'Save to database
'****************
Dim strHTML as String
Dim strlf as String
Dim strS1 as String
Dim strS2 as String
Dim strS3 as String
Dim strErr as String
Dim bSuccess as Boolean
Dim sPath as String
Dim conn
Dim rs
Dim lngInvoiceNumber as Long
Dim lngInvoiceReference as Long

sPath = "D:\inetpub\www\orbisoft\fpdb\dbOnlineOrders.m db"

conn = Server.CreateObject("ADODB.Connection")
conn.open ("Provider=Microsoft.Jet.OLEDB.4.0;" & "Persist Security
Info=TRUE;" & "Data Source=" & sPath, "Admin", "")
rs = server.createobject("adodb.recordset")
rs.open ("tblOrders", conn, 2, 2)
rs.addnew

if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
if Request("LastName") <> "" then rs("LastName")=
strProper(Request("LastName"))

etc...



And here's the error it now gives (falling over on the 211 rs.addnew line):
Server Error in '/' Application.

Cannot update. Database or object is read-only.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Cannot
update. Database or object is read-only.

Source Error:

Line 209: rs.open ("tblOrders", conn, 2, 2)
Line 210:
Line 211: rs.addnew
Line 212:
Line 213: if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
Source File:
D:\Inetpub\www\orbisoft\products\taskmanager\2005\ purchase\order-details.asp x Line: 211

Stack Trace:

[COMException (0x80040e09): Cannot update. Database or object is
read-only.]

Microsoft.VisualBasic.CompilerServices.LateBinding .InternalLateCall(Object
o, Type objType, String name, Object[] args, String[] paramnames, Boolean[] CopyBack, Boolean IgnoreReturn) +798
Microsoft.VisualBasic.CompilerServices.LateBinding .LateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack) +23
ASP.order_details_aspx.__Render__control1(HtmlText Writer __output,
Control parameterContainer) in
D:\Inetpub\www\orbisoft\products\taskmanager\2005\ purchase\order-details.asp x:211
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1926
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300
Any ideas very much appreciated ....

Mark




Nov 21 '05 #5
I have created an ultra-simple database and aspx test page at:
http://www.orbisoft.com/products/tas...hase/test.aspx
to illustrate that it is still a Windows 2003 Server permissions issue:

The aspx page HTML is simply:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<%@Page aspcompat=true Language = VB Debug="true"%>
<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.OleDb"%>
<%@Import Namespace="System.Globalization"%>

<%
Dim sPath as String, conn, rs
sPath = "D:\inetpub\www\orbisoft\fpdb\db12.mdb"
conn = Server.CreateObject("ADODB.Connection")
conn.open ("Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & sPath)
rs = server.createobject("adodb.recordset")
rs.open ("Table1", conn, 2, 2)
rs.addnew
rs.update
%>
It still gives the same error message "Cannot update. Database or object is
read-only."

Ken - Do you know what the ADO.NET for the above sample would be?

"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:Og**************@TK2MSFTNGP15.phx.gbl...
Hi,

Any way you could update you code to use ado.net instead of ado?

Ken
----------------
"Mark B" <mb*******@Delete-All-X-XorbisofXXt.com> wrote in message
news:ue*************@TK2MSFTNGP09.phx.gbl...
I did that and it didn't catch the rs.addnew error -- it just breezed
through it and then gave the same error but for the next statement:

Line 222: if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))

Server Error in '/' Application.

Cannot update. Database or object is read-only.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Cannot
update. Database or object is read-only.

Source Error:

Line 221:
Line 222: if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
Line 223: if Request("LastName") <> "" then rs("LastName")=
strProper(Request("LastName"))
Line 224: if Request("Company") <> "" then rs("Organization")=
Request("Company")




"Ken Tucker [MVP]" <vb***@bellsouth.net> wrote in message
news:OV**************@tk2msftngp13.phx.gbl...
Hi,

Try enclosing rs.addnew is a try catch block to get a

better
error message. Sql server is much better for the web than access. MSDE

is
a free version of sql server.

Try
rs.addnew
catch ex as exception
Response.write(ex.tostring)
end try

http://www.microsoft.com/downloads/d...displaylang=en

Ken
---------------------
"Mark B" <mb*******@Delete-All-X-XorbisofXXt.com> wrote in message
news:eV*************@TK2MSFTNGP09.phx.gbl...
Our webhost (www.usbusinessweb.net) had a W2K IIS5 server crash after a
scheduled hard-boot occurred during a ms-security patch install overnight. They couldn't get the server working again so they transferred our site
www.orbisoft.com to a new W2003 IIS6 server they set up.

That was a week ago.

Since that transfer, all of our ASPX pages that use Access2000 databases
have stopped working.

Our main one is our "buy" page at

http://www.orbisoft.com/products/tas...t-version.aspx
which means potential customers can't purchase there.

I have shown the error below which essentially says "Cannot update.

Database
or object is read-only."

After numerous assurances from our webhost that they have set anonymous

user
write access for both the /fpdb folder and the individual databases we

still
get the same error. They say it is our fault in that there is something in our code that isn't right. They say the have another user where their aspx pages with MSAccess are working. I said "but all aspx pages were working
fine on IIS5...."

"Line 211: rs.addnew" below is the where the error is highlighted.

The actual relevant code snip-it is as follows with the runtime error

listed
below that. You also are welcome to test the page at

http://www.orbisoft.com/products/tas...t-version.aspx
with a junk order too - I won't hold you to it:

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">

<%@Page aspcompat=true Language = VB Debug="true"%>
<%@Import Namespace="aspNetEmail"%>
<%@Import Namespace="System.Data"%>
<%@Import Namespace="System.Data.OleDb"%>
<%@Import Namespace="aspNetMX"%>
<%@Import Namespace="System.Globalization"%>

<script language="VB" runat="server">

Dim strFirstName as String
Dim strLastName as String
Dim strExisting as String
Dim strNumberUsers as String
Dim strCompany as String
Dim strTitle as String
Dim strEmailAddress as String
Dim strAddress as String
Dim strCity as String
Dim strState as String
Dim strZip as String
Dim strCountry as String
Dim strTelephone as String
Dim strIndustry as String
Dim strOtherIndustry as String
Dim strWHSpecific as String
Dim strComment as String
Dim strPromoCode as String
Dim strProductName as String
Dim dblQuantity as Double
Dim dblProductPrice as Double
Dim dblExtension as Double
Dim dblPromotionalCodeSavings as Double
Dim dblTotalUSD as Double
Public Function strProper(strRaw as String) As String
Dim currentTextInfo
currentTextInfo = CultureInfo.CurrentCulture.TextInfo
strProper = currentTextInfo.ToTitleCase(strRaw)
End Function

Function bolStoreEntries()
'Store entries temporarily for populating after validation fail
'************************************************* *************
strFirstName = Request("FirstName")
strLastName = Request("LastName")
strExisting = "No"
strNumberUsers = Request("NumberUsers")
strCompany = Request("Company")
strTitle = Request("Title")
strEmailAddress = Request("EmailAddress")
strAddress = Request("Address")
strCity = Request("City")
strState = Request("State")
strZip = Request("Zip")
strCountry = Request("Country")
strTelephone = Request("Telephone")
strIndustry = Request("Industry")
strOtherIndustry = Request("OtherIndustry")
strWHSpecific = Request("WhereHeard")
strComment = Request("Comment")
End Function
</script>
<%
Dim bolErr as Boolean
bolStoreEntries
fCalculatePrices
If Request("OrderNow") <> "" Then

'Save to database
'****************
Dim strHTML as String
Dim strlf as String
Dim strS1 as String
Dim strS2 as String
Dim strS3 as String
Dim strErr as String
Dim bSuccess as Boolean
Dim sPath as String
Dim conn
Dim rs
Dim lngInvoiceNumber as Long
Dim lngInvoiceReference as Long

sPath = "D:\inetpub\www\orbisoft\fpdb\dbOnlineOrders.m db"

conn = Server.CreateObject("ADODB.Connection")
conn.open ("Provider=Microsoft.Jet.OLEDB.4.0;" & "Persist Security
Info=TRUE;" & "Data Source=" & sPath, "Admin", "")
rs = server.createobject("adodb.recordset")
rs.open ("tblOrders", conn, 2, 2)
rs.addnew

if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
if Request("LastName") <> "" then rs("LastName")=
strProper(Request("LastName"))

etc...



And here's the error it now gives (falling over on the 211 rs.addnew

line):

Server Error in '/' Application.

Cannot update. Database or object is read-only.

Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Runtime.InteropServices.COMException: Cannot
update. Database or object is read-only.

Source Error:

Line 209: rs.open ("tblOrders", conn, 2, 2)
Line 210:
Line 211: rs.addnew
Line 212:
Line 213: if Request("FirstName") <> "" then rs("FirstName")=
strProper(Request("FirstName"))
Source File:

D:\Inetpub\www\orbisoft\products\taskmanager\2005\ purchase\order-details.asp
x Line: 211

Stack Trace:

[COMException (0x80040e09): Cannot update. Database or object is
read-only.]

Microsoft.VisualBasic.CompilerServices.LateBinding .InternalLateCall(Object o, Type objType, String name, Object[] args, String[] paramnames,

Boolean[]
CopyBack, Boolean IgnoreReturn) +798
Microsoft.VisualBasic.CompilerServices.LateBinding .LateCall(Object o,
Type objType, String name, Object[] args, String[] paramnames, Boolean[]
CopyBack) +23
ASP.order_details_aspx.__Render__control1(HtmlText Writer __output,
Control parameterContainer) in

D:\Inetpub\www\orbisoft\products\taskmanager\2005\ purchase\order-details.asp
x:211
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer) +27
System.Web.UI.Control.Render(HtmlTextWriter writer) +7
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +243
System.Web.UI.Page.ProcessRequestMain() +1926
Version Information: Microsoft .NET Framework Version:1.1.4322.2300;

ASP.NET
Version:1.1.4322.2300
Any ideas very much appreciated ....

Mark




Nov 21 '05 #6
On Tue, 26 Jul 2005 11:35:12 +1200, "Mark B" <mb*******@Delete-All-X-XorbisofXXt.com> wrote:

¤ Our webhost (www.usbusinessweb.net) had a W2K IIS5 server crash after a
¤ scheduled hard-boot occurred during a ms-security patch install overnight.
¤ They couldn't get the server working again so they transferred our site
¤ www.orbisoft.com to a new W2003 IIS6 server they set up.
¤
¤ That was a week ago.
¤
¤ Since that transfer, all of our ASPX pages that use Access2000 databases
¤ have stopped working.
¤
¤ Our main one is our "buy" page at
¤ http://www.orbisoft.com/products/tas...t-version.aspx
¤ which means potential customers can't purchase there.
¤
¤ I have shown the error below which essentially says "Cannot update. Database
¤ or object is read-only."
¤

What you are experiencing is related to NTFS permissions. If your application is not using
impersonation then the NetworkService account (the default account under which the thread of your
application executes under IIS 6.0 and Windows 2003) must have Full permissions to the folder where
the Access database is located.
Paul
~~~~
Microsoft MVP (Visual Basic)
Nov 21 '05 #7
It's nothing about IIS.
In Win2003, there is a change.
You must give rights to edit data of the directory, where you put the ACCESS
mdb file in, to the user ASPnet (sorry, I forget the certain name, only be
similar)
Nov 21 '05 #8
Yes. From our webhost:

"Had to redo your permissions in NTFS for /fpdb directories to allow write
permission for anonymous internet user - and at
the same time I have verified it is indeed NETWORK SERVICES user that also
needs write permission on your database directories in addition to anonymous
internet user, (which wasn't the case in IIS5)"

"Allen St.Clair" <al************@msn.com> wrote in message
news:OK**************@TK2MSFTNGP10.phx.gbl...
It's nothing about IIS.
In Win2003, there is a change.
You must give rights to edit data of the directory, where you put the ACCESS mdb file in, to the user ASPnet (sorry, I forget the certain name, only be
similar)

Nov 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: John Chertudi | last post by:
We are poised to migrate about 600 ASP sites from a single IIS5 server to a new pair of IIS6 servers. However, it appears that all files with includes like: <!-- #include...
1
by: Naga Kiran | last post by:
Hi I have a small query in ASP.Net on windows2003 server platform.. I built an Application in ASP.Net.... This application is hosted on the system where that system has Windows2003 Operating...
4
by: JK | last post by:
We recently installed our web application on Windows 2003 and found that our ASPX pages are not coming up correctly. We are using sessionstate=StateServer and cookieless=true for Web.config....
0
by: Mark B | last post by:
Our webhost (www.usbusinessweb.net) had a W2K IIS5 server crash after a scheduled hard-boot occurred during a ms-security patch install overnight. They couldn't get the server working again so they...
0
by: Dariusz Tomon | last post by:
Hello My problem is like that: I have got IIS 5.0 server (WIN2000) with a lot of services written in ASP. Now we'd like to move to new machine with win2003 (IIS6). I heard that there are a...
5
by: Terry Strachan | last post by:
Hi, I have an asp.net webapp that works fine on my development machine, win2k/iis5 however, when I move the site across to win2k3 / iis6 i get the following error on postback of any page; ...
0
by: Brian | last post by:
I have an ASP.NET 1.1 application that does URL rewriting via a custom HttpModule. We recently migrated this application from Win2k/IIS5 to Win2k3/IIS6. In IIS5, I added a wildcard application map...
1
by: Luwk | last post by:
I have an application that communicates with the Company's Active Directory to get the OU of the users. This said application is an ASP.Net web site and has the Windows Authentication enabled. ....
7
by: Electric Co. | last post by:
Hello, note: This is for a Faculty web site that is undergoing a migration to an open source solution so my motives are legit. I need to build a relay from IIS handling URL_A to a PHP server...
4
by: S.Tedeschi | last post by:
Hi all guru, for sure I'm too old for a bunch of no-sleep-nights. M$' drivin' me nut. Switching my ASP.NET 1.1 apps to 2.0 has made me tryin' for several days with no success. -My IIS5.1 (Xp...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.