 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Efim Mett Guest
|
Posted: Thu Sep 14, 2006 10:25 pm Post subject: Update hangs if Select is opened |
|
|
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
|
Posted: Fri Sep 15, 2006 3:46 pm Post subject: Re: Update hangs if Select is opened |
|
|
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
|
Posted: Wed Sep 27, 2006 10:40 pm Post subject: Re: Update hangs if Select is opened |
|
|
I wonder if nobody could reproduce this behaviour?? Or all are so-o-o busy
?
/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
|
Posted: Wed Oct 11, 2006 1:44 pm Post subject: Re: Update hangs if Select is opened |
|
|
QC #35076
/Efim |
|
| Back to top |
|
 |
|
|
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
|
|