Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_database_setup thread: Re: HELP!! Cannot update. Database or object is read-only


Message #1 by "Jean Sin" <bernardjbs@h...> on Mon, 4 Feb 2002 20:19:15
> Hi, I'm against a wall!!

> 

> I use the following code:

> 

>         Dim strDataNews, strTitleNews, strTestoNews

> 	Dim objRS

> 	

> 	strDataNews = Request.Form("Data_News")

> 	strTitleNews = Request.Form("Title_News")

> 	strTestoNews = Request.Form("Testo_News")

> 	

> 	Set objRS = Server.CreateObject ("ADODB.Recordset")

> 	objRS.Open "News", strConnect, adOpenStatic, 

>                     adLockOptimistic,adCmdTable

> 	

> 	objRS.MoveLast

> 	objRS.AddNew

> 	objRS("DataNews") = strDataNews

> 	objRS("TitoloNews") = strTitleNews

> 	objRS("FullNews") = strTestoNews

> 	objRS.Update

> 	objRS.Close

> 	

> 	Set objRS = Nothing

> 

> which is almost the same as the one showed at page 595-6. I try to 

> populate a Database but I get the error showed in the Subject line at 

the 

> line containing "objRS.AddNew". 

> 

> The first field in the DB is a "AutoNumber" field called "NewsID" which 

is 

> supposed to update itself.

> 

> What is wrong in this code and why do I get this error?

> 

> This is the full error:

> 

> Error Type:

> Microsoft JET Database Engine (0x80040E09)

> Cannot update. Database or object is read-only.

> 

> Thanks for help.

> 

> 



Go to your virtual directory properties -> Directory Security -> Edit 

(anonymous access and authentication control) -> uncheck anonymous 

access. 



Hope this will help most of you. Cheers!

Message #2 by "Peter Scribner" <plscribner@w...> on Mon, 4 Feb 2002 17:49:43 -0500
Jean,



Take a look at www.wipschedule.com/p2pExample1.htm . That was a response to

a different question but should work for this problem as well.

Hope this helps.

Peter

----- Original Message -----

From: "Jean Sin" <bernardjbs@h...>

To: "ASP Database Setup" <asp_database_setup@p...>

Sent: Monday, February 04, 2002 8:19 PM

Subject: [asp_database_setup] Re: HELP!! Cannot update. Database or object

is read-only





> > Hi, I'm against a wall!!

> >

> > I use the following code:

> >

> >         Dim strDataNews, strTitleNews, strTestoNews

> > Dim objRS

> >

> > strDataNews = Request.Form("Data_News")

> > strTitleNews = Request.Form("Title_News")

> > strTestoNews = Request.Form("Testo_News")

> >

> > Set objRS = Server.CreateObject ("ADODB.Recordset")

> > objRS.Open "News", strConnect, adOpenStatic,

> >                     adLockOptimistic,adCmdTable

> >

> > objRS.MoveLast

> > objRS.AddNew

> > objRS("DataNews") = strDataNews

> > objRS("TitoloNews") = strTitleNews

> > objRS("FullNews") = strTestoNews

> > objRS.Update

> > objRS.Close

> >

> > Set objRS = Nothing

> >

> > which is almost the same as the one showed at page 595-6. I try to

> > populate a Database but I get the error showed in the Subject line at

> the

> > line containing "objRS.AddNew".

> >

> > The first field in the DB is a "AutoNumber" field called "NewsID" which

> is

> > supposed to update itself.

> >

> > What is wrong in this code and why do I get this error?

> >

> > This is the full error:

> >

> > Error Type:

> > Microsoft JET Database Engine (0x80040E09)

> > Cannot update. Database or object is read-only.

> >

> > Thanks for help.

> >

> >

>

> Go to your virtual directory properties -> Directory Security -> Edit

> (anonymous access and authentication control) -> uncheck anonymous

> access.

>

> Hope this will help most of you. Cheers!

>



plscribner@w...


$subst('Email.Unsub')

>




$subst('Email.Unsub').

>



Message #3 by "Craig Flannigan" <ckf@k...> on Tue, 5 Feb 2002 14:56:35 -0000
I think you need to check the folder that the database resides in.



The IUSR_MachineName on your webserver needs to have Read/Modify permissions

so that it can write it's locking file when it opens your database. Without

this, it can only read.



HTH

Craig.







-----Original Message-----

From: Peter Scribner [mailto:plscribner@w...]

Sent: 04 February 2002 22:50

To: ASP Database Setup

Subject: [asp_database_setup] Re: HELP!! Cannot update. Database or

object is read-only





Jean,



Take a look at www.wipschedule.com/p2pExample1.htm . That was a response to

a different question but should work for this problem as well.

Hope this helps.

Peter

----- Original Message -----

From: "Jean Sin" <bernardjbs@h...>

To: "ASP Database Setup" <asp_database_setup@p...>

Sent: Monday, February 04, 2002 8:19 PM

Subject: [asp_database_setup] Re: HELP!! Cannot update. Database or object

is read-only





> > Hi, I'm against a wall!!

> >

> > I use the following code:

> >

> >         Dim strDataNews, strTitleNews, strTestoNews

> > Dim objRS

> >

> > strDataNews = Request.Form("Data_News")

> > strTitleNews = Request.Form("Title_News")

> > strTestoNews = Request.Form("Testo_News")

> >

> > Set objRS = Server.CreateObject ("ADODB.Recordset")

> > objRS.Open "News", strConnect, adOpenStatic,

> >                     adLockOptimistic,adCmdTable

> >

> > objRS.MoveLast

> > objRS.AddNew

> > objRS("DataNews") = strDataNews

> > objRS("TitoloNews") = strTitleNews

> > objRS("FullNews") = strTestoNews

> > objRS.Update

> > objRS.Close

> >

> > Set objRS = Nothing

> >

> > which is almost the same as the one showed at page 595-6. I try to

> > populate a Database but I get the error showed in the Subject line at

> the

> > line containing "objRS.AddNew".

> >

> > The first field in the DB is a "AutoNumber" field called "NewsID" which

> is

> > supposed to update itself.

> >

> > What is wrong in this code and why do I get this error?

> >

> > This is the full error:

> >

> > Error Type:

> > Microsoft JET Database Engine (0x80040E09)

> > Cannot update. Database or object is read-only.

> >

> > Thanks for help.

> >

> >

>

> Go to your virtual directory properties -> Directory Security -> Edit

> (anonymous access and authentication control) -> uncheck anonymous

> access.

>

> Hope this will help most of you. Cheers!

>



plscribner@w...


$subst('Email.Unsub')

>




$subst('Email.Unsub').

>







ckf@k...


$subst('Email.Unsub')






$subst('Email.Unsub').



_____________________________________________________________________

This message has been checked for all known viruses by Star Internet

delivered through the MessageLabs Virus Scanning Service on behalf of

Kingfield Heath Ltd. For further information visit

http://www.star.net.uk/stats.asp





_____________________________________________________________________

This message has been checked for all known viruses by Star Internet

delivered through the MessageLabs Virus Scanning Service on behalf of Kingfield Heath Ltd. For further information visit
http://www.star.net.uk/stats.asp


  Return to Index