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 

Update hangs if Select is opened

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Efim Mett
Guest





PostPosted: Thu Sep 14, 2006 10:25 pm    Post subject: Update hangs if Select is opened Reply with quote



Hi community,

I have encountered the following phenomenon when working with a MS SQL 2005
DB using DBExpress in a VCL.Net application:

Pseudocode:
SELECT Field1, Field2 FROM Table1: ok
First: ok
while not EOF do begin
......
UPDATE Table1 SET Field2=<Value1> Where Field1 = <Value2>
Next
end

UPDATE is executed only if there is no record in the SELECT result with
Field1=<Value2>, i.e. no record is updated.
In the other case applications is blocked, and MS SQL does nothing (as
observered in SQL Profiler).
The same behaviour using BDP.

I feel it can have something to do with Isolation Level, but no success
using BDP. How I can set it with DB Express?
In SQL DB Manager is everything ok.

Any clue?

/Efim
Back to top
Efim Mett
Guest





PostPosted: Fri Sep 15, 2006 3:46 pm    Post subject: Re: Update hangs if Select is opened Reply with quote



I believe I could figure out the problem.

2 conditions are necessary to reproduce the behaviour:
1. SELECT contains at least one Join
2. SELECT contains at least 1 BLOB-field (of subtype image in my case)

I've put a small example in "Attachments" to illustrate the problem with
DBExpress, BDP and native SQL providers.
Whereas BDP and DBExpress point the same behaviour, SQL doesn't allow to run
UPDATE at all with the error message "Update is not possible with an opened
DataReader" (translated from german), no matter how SELECT is built.

/Efim
Back to top
Efim Mett
Guest





PostPosted: Wed Sep 27, 2006 10:40 pm    Post subject: Re: Update hangs if Select is opened Reply with quote



I wonder if nobody could reproduce this behaviour?? Or all are so-o-o busy
Smile?

/Efim


"Efim Mett" <Efim.Mett@t-online.de> schrieb im Newsbeitrag
news:450a848d (AT) newsgroups (DOT) borland.com...
Quote:
I believe I could figure out the problem.

2 conditions are necessary to reproduce the behaviour:
1. SELECT contains at least one Join
2. SELECT contains at least 1 BLOB-field (of subtype image in my case)

I've put a small example in "Attachments" to illustrate the problem with
DBExpress, BDP and native SQL providers.
Whereas BDP and DBExpress point the same behaviour, SQL doesn't allow to
run
UPDATE at all with the error message "Update is not possible with an
opened
DataReader" (translated from german), no matter how SELECT is built.

/Efim

Back to top
Efim Mett
Guest





PostPosted: Wed Oct 11, 2006 1:44 pm    Post subject: Re: Update hangs if Select is opened Reply with quote

QC #35076

/Efim
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) 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.