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 

Re: Slow Writing to Sybase Database

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





PostPosted: Wed Aug 27, 2003 8:34 am    Post subject: Re: Slow Writing to Sybase Database Reply with quote



Do you use TTable?
DON'T.
TTable (with some drivers) opens another connection, so the update takes
place in another transaction, so updated records are locked until commit.
If you set option Blocking=OFF, you will get "locking error" instead of
freeze.
1. try to set TransIsolation=tiDirtyRead
2. use TQuery instead of TTable
3. do a commit after apply

Another option is to switch to a bde alternative like sql-direct or asadac.

--
Robert Cerny
http://codecentral.borland.com/codecentral/ccWeb.exe/author?authorid=18355

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

Quote:
I am using Delphi 5 (bde) as the front end to Sybase SQLAnywhere
databases.
Suddenly last night the application started hanging when posting cached
updates to a particular set of master/detail tables. When the save button
is
clicked several things happen. Some code runs on before post of the detail
table query, another database is updated and a stored procedure is
sometimes
called from the on update record event of the detail table query, and
finally the cached updates are applied to both tables from the after post
event of the master table query. After the cached updates are applied a
separate query is run to display information from both tables in a grid.
All of the code executes and then it hangs on this query that should
return
a set of records that include the master/detail records just saved. I
have
run through this code several times and had to stop the application
running
using the program reset option. What I discovered is that after doing
this
several times, all of a sudden some of the records I had entered had
indeed
been saved, but they didn't 'appear' until several minutes later. I am
assuming that the writing of the records to the database is being delayed
for some reason and that is what is causing the app to hang. I have
several
other master/detail tables that are having no problem being updated and
other requests that are functioning normally (reports, queries, etc) The
problem seems to be only with updating these two tables. I am at a loss
as
to what to even look at or for. I have validated the database, indexes,
and
data - no problems found. Any ideas on what might be happening? Thanks.





Back to top
Paul Linehan
Guest





PostPosted: Wed Aug 27, 2003 9:19 am    Post subject: Re: Slow Writing to Sybase Database Reply with quote





[email]rheau (AT) beaverplastics (DOT) com[/email] says...

Quote:
I have validated the database, indexes, and
data - no problems found. Any ideas on what might be happening? Thanks.


You may or may not have checked this. Do you still have a good bit of
disk space on the drive(s) that the db is sitting on. I know from
experience that when informix drives get about 95% full, watch out!


Paul...

--

plinehan__AT__yahoo__DOT__com

C++ Builder 5 SP1, Interbase 6.0.1.6 IBX 5.04

Tendon getting better, can now touch type,
but V and B still hurt!


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.