BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Strange behaviour Table Read Only

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Rhea Urusky
Guest





PostPosted: Thu Aug 28, 2003 5:45 pm    Post subject: Strange behaviour Table Read Only Reply with quote



I have a Delphi5 app that has been running for almost 4 years. All of a
sudden today I am getting the table is read only error when I try to insert
a record into a table. I am using cached updates an updatesql component.
This code has worked fine all along until today. I am at a loss as to what
to look for. Any ideas?



Back to top
Kevin Frevert
Guest





PostPosted: Thu Aug 28, 2003 6:05 pm    Post subject: Re: Strange behaviour Table Read Only Reply with quote



Rhea,

Could somebody have changed the RequestLive property (should be False,
CachedUpdates=True)? CachedUpdates uses Paradox files, could the network
admin changed permissions (read-only access)?

krf

"Rhea Urusky" <rheau (AT) beaverplastics (DOT) com> wrote

Quote:
I have a Delphi5 app that has been running for almost 4 years. All of a
sudden today I am getting the table is read only error when I try to
insert
a record into a table. I am using cached updates an updatesql component.
This code has worked fine all along until today. I am at a loss as to what
to look for. Any ideas?





Back to top
Craig Stuntz [TeamB]
Guest





PostPosted: Thu Aug 28, 2003 6:12 pm    Post subject: Re: Strange behaviour Table Read Only Reply with quote



Rhea Urusky wrote:

Quote:
I have a Delphi5 app that has been running for almost 4 years. All
of a sudden today I am getting the table is read only error when I
try to insert a record into a table. I am using cached updates an
updatesql component. This code has worked fine all along until
today. I am at a loss as to what to look for. Any ideas?

This is Paradox-related, AFAIK. Easiest fix is to get rid of Cached
Updates, or anything else which could pull Paradox into play. Making
Paradox work reliably in a multi-user environment is difficult to
impossible.

-Craig

--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://delphi.weblogs.com
Useful articles about InterBase and Delphi development:
http://delphi.weblogs.com/articles

Back to top
Kevin Frevert
Guest





PostPosted: Thu Aug 28, 2003 6:16 pm    Post subject: Re: Strange behaviour Table Read Only Reply with quote

"Craig Stuntz [TeamB]" <cstuntz (AT) vertexsoftware (DOT) com> wrote

Quote:
Easiest fix is to get rid of Cached Updates

....and
http://community.borland.com/article/0,1410,22571,00.html




Back to top
Eduardo Andrade Bahiense
Guest





PostPosted: Thu Aug 28, 2003 6:27 pm    Post subject: Re: Strange behaviour Table Read Only Reply with quote


"Rhea Urusky" <rheau (AT) beaverplastics (DOT) com> escreveu na mensagem
news:3f4e3ffb$1 (AT) newsgroups (DOT) borland.com...
Quote:
I have a Delphi5 app that has been running for almost 4 years. All of a
sudden today I am getting the table is read only error when I try to
insert
a record into a table. I am using cached updates an updatesql component.
This code has worked fine all along until today. I am at a loss as to what
to look for. Any ideas?






Back to top
Eduardo Andrade Bahiense
Guest





PostPosted: Thu Aug 28, 2003 6:29 pm    Post subject: Re: Strange behaviour Table Read Only Reply with quote

Sorry for the blank answer... accident

Is it posible that someone copied you database from read only media like a
CD?

Cheers, Eduardo


"Rhea Urusky" <rheau (AT) beaverplastics (DOT) com> escreveu na mensagem
news:3f4e3ffb$1 (AT) newsgroups (DOT) borland.com...
Quote:
I have a Delphi5 app that has been running for almost 4 years. All of a
sudden today I am getting the table is read only error when I try to
insert
a record into a table. I am using cached updates an updatesql component.
This code has worked fine all along until today. I am at a loss as to what
to look for. Any ideas?






Back to top
Rhea Urusky
Guest





PostPosted: Thu Aug 28, 2003 7:02 pm    Post subject: Re: Strange behaviour Table Read Only Reply with quote

No, nothing like that.


"Eduardo Andrade Bahiense" <eduardo (AT) fdv (DOT) com.br> wrote

Quote:
Sorry for the blank answer... accident

Is it posible that someone copied you database from read only media like a
CD?

Cheers, Eduardo


"Rhea Urusky" <rheau (AT) beaverplastics (DOT) com> escreveu na mensagem
news:3f4e3ffb$1 (AT) newsgroups (DOT) borland.com...
I have a Delphi5 app that has been running for almost 4 years. All of a
sudden today I am getting the table is read only error when I try to
insert
a record into a table. I am using cached updates an updatesql
component.
This code has worked fine all along until today. I am at a loss as to
what
to look for. Any ideas?








Back to top
Craig Stuntz [TeamB]
Guest





PostPosted: Thu Aug 28, 2003 7:20 pm    Post subject: Re: Strange behaviour Table Read Only Reply with quote

Craig Stuntz [TeamB] wrote:

Quote:
This is Paradox-related, AFAIK.

Gad. I'm thinking of a completely different error. I don't know how
I misread your post so badly, Rhea. Pay no attention, please. :)

But the comments about "multi-user Paradox" stand, and it is true that
the BDE's Cached Updates uses Paradox internally.

-Craig

--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://delphi.weblogs.com
Everything You Need to Know About InterBase Character Sets:
http://delphi.weblogs.com/stories/storyReader$306


Back to top
Rhea Urusky
Guest





PostPosted: Thu Aug 28, 2003 7:23 pm    Post subject: Re: Strange behaviour Table Read Only Reply with quote

I should have stated what database I use, it is Sybase SQLAnywhere 8.0.2.
Another strange thing is I have two forms that use the same code (for
various reasons) depending on the type of product the user is dealing with.
The code on one form runs fine, the other doesn't. I haven't made any
changes to either form or the database. I am a one person department here
so I program as well as maintain the databases. RequestLive is set to
false. CachedUpdates are set to false. We have had a few weird things this
week. I also had trouble earlier this week inserting rows into a set of
master/detail tables. The application started hanging when saving a new
record out of the blue - at 8:00 PM in the evening. Our plant runs 24/7 so
that part of the app is always in use for entering production. Anyway, I
narrowed it down to a query that ran after the updates were applied to
display data in a grid. I still have no idea why the app would hang there,
you could cause the queries to run by changing operator names, shift, or
date and the code would run just fine. But try to run it after a new record
had been added and forget it, it would just hang. Now how could the same
code run when fetching data that already exists, but not run after a new
record has been added? And this code worked fine until a couple of nights
ago. I did finally get this error on one pc out in the plant: serialization
failure, deadlock detected. I've read a few post on that topic, but haven't
found anything within the app that would cause it. There are three
computers running simultaneously 24/7 that use only the form causing the
problem. How could it work for 4 years and then suddenly get a deadlock? I
worked on debugging this problem all day and was getting the same error
running from my pc. I went out to the plant near the end of the day and one
operator has been entering records successfully all day, but I couldn't! It
just seems so bizarre to me. We upgraded our databases, but that was several
months ago. We have several gig of free space on the server where the
databases reside so no problem there.


"Craig Stuntz [TeamB]" <cstuntz (AT) vertexsoftware (DOT) com> wrote

Quote:
Rhea Urusky wrote:

I have a Delphi5 app that has been running for almost 4 years. All
of a sudden today I am getting the table is read only error when I
try to insert a record into a table. I am using cached updates an
updatesql component. This code has worked fine all along until
today. I am at a loss as to what to look for. Any ideas?

This is Paradox-related, AFAIK. Easiest fix is to get rid of Cached
Updates, or anything else which could pull Paradox into play. Making
Paradox work reliably in a multi-user environment is difficult to
impossible.

-Craig

--
Craig Stuntz [TeamB] . Vertex Systems Corp. . Columbus, OH
Delphi/InterBase Weblog : http://delphi.weblogs.com
Useful articles about InterBase and Delphi development:
http://delphi.weblogs.com/articles




Back to top
Kevin Frevert
Guest





PostPosted: Thu Aug 28, 2003 7:34 pm    Post subject: Re: Strange behaviour Table Read Only Reply with quote

Rhea,

If your using Cachedupdates, then that property must be set to True.

Ideally, don't use CachedUpdates and check out
http://community.borland.com/article/0,1410,22571,00.html

Good luck,
krf

"Rhea Urusky" <rheau (AT) beaverplastics (DOT) com> wrote

Quote:
RequestLive is set to false. CachedUpdates are set to false.




Back to top
Rhea Urusky
Guest





PostPosted: Thu Aug 28, 2003 7:44 pm    Post subject: Re: Strange behaviour Table Read Only Reply with quote

Sorry, I meant that cached updates are set to true!

"Kevin Frevert" <kevin (AT) workdrinkingcoffee (DOT) com> wrote

Quote:
Rhea,

If your using Cachedupdates, then that property must be set to True.

Ideally, don't use CachedUpdates and check out
http://community.borland.com/article/0,1410,22571,00.html

Good luck,
krf

"Rhea Urusky" <rheau (AT) beaverplastics (DOT) com> wrote in message
news:3f4e56bc$1 (AT) newsgroups (DOT) borland.com...
RequestLive is set to false. CachedUpdates are set to false.






Back to top
Kevin Frevert
Guest





PostPosted: Wed Sep 03, 2003 4:32 pm    Post subject: Re: Strange behaviour Table Read Only Reply with quote

Rhea,

The only way I am able to reproduce that error is setting RequestLive =
True on a read-only result set (SQL containing joins). Other than that,
check out
http://www.fulltextsearch.com

Good luck,
krf

"Rhea Urusky" <rheau (AT) beaverplastics (DOT) com> wrote

Quote:
Sorry, I meant that cached updates are set to true!

"Kevin Frevert" <kevin (AT) workdrinkingcoffee (DOT) com> wrote in message
news:3f4e594c (AT) newsgroups (DOT) borland.com...
Rhea,

If your using Cachedupdates, then that property must be set to True.

Ideally, don't use CachedUpdates and check out
http://community.borland.com/article/0,1410,22571,00.html

Good luck,
krf

"Rhea Urusky" <rheau (AT) beaverplastics (DOT) com> wrote in message
news:3f4e56bc$1 (AT) newsgroups (DOT) borland.com...
RequestLive is set to false. CachedUpdates are set to false.







Back to top
Joe Griffin
Guest





PostPosted: Wed Sep 03, 2003 9:40 pm    Post subject: Re: Strange behaviour Table Read Only Reply with quote

Rhea Urusky wrote:

Quote:
I have a Delphi5 app that has been running for almost 4 years. All of a
sudden today I am getting the table is read only error when I try to insert
a record into a table. I am using cached updates an updatesql component.

I have an application which is used at a number of locations. Suddenly one of the locations
started hitting problems which came down to a cached update reporting that the table was
read-only. All I managed to find was that the SQL query was not a straight-forward "Select",
but more complex (see below). I re-figured the code to make a more straight-forward update
and it hasn't given any more problems.

The troublesome code was:

SELECT DISTINCT P.REF_NO, P.START_TIME, P.END_TIME, P.MICA_CONTRACT, P.WORKS_ORDER_NO,
P.SUPERVISOR, P.CHANGED_BY, P.CHANGED_AT
FROM USAGE P, (SELECT DISTINCT REF_NO, MAX(START_TIME) AS MaxDate FROM USAGE GROUP BY
REF_NO) M
WHERE (P.REF_NO = M.REF_NO)
AND (P.START_TIME = M.MaxDate)
AND (P.REF_NO = :Ref)

My guess was that the embedded select was what was causing the problem. What I did was keep
this SQL to find the data, then use a separate query for the actual updating.

You may have something similar.
... Joe
Member of the UK Borland User Group


Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.