Board index » delphi » Concurrency problems - second posting

Concurrency problems - second posting

I have a CGI app using dbExpress but I run into problems if two instances
run at the same time.

The CGI accesses the database entirely via stored procedures, which
typically perform various checks before inserting and updating appropriate
records and returning a result set.  We've been testing by driving it from
two PCs and trying to sumit requests at the same moment. This means that IIS
runs two instances of the exe at the same time.  One succeeds and the other
generates the exception: "No open cursor returned..."

Incidentally, I can get the same exception running a single instance if a
stored procedure does an INSERT followed by a SELECT and I neglect to "SET
NOCOUNT ON".  I imagine this is because DBExpress gets confused by the
rowcount returned by the INSERT and goes on to ignore the cursor.

Can anyone advise?
Tim

 

Re:Concurrency problems - second posting


Hi Tim

There are several issues with the SQL Server driver.
Quality Central Report 3689 can sometimes be worked around by adding set
nocount on/off, but it is usually a flakey solution as you have found out.

I'm led to believe Borland are closish to releasing an update for the
MSSQL driver. Until then, try changing the parameters to varchar and do
the conversion in the proc. Let us know how you go

HTH
Regards
Clint.

Quote
Tim Radford wrote:
> I have a CGI app using dbExpress but I run into problems if two instances
> run at the same time.

> Incidentally, I can get the same exception running a single instance if a
> stored procedure does an INSERT followed by a SELECT and I neglect to "SET
> NOCOUNT ON".  I imagine this is because DBExpress gets confused by the
> rowcount returned by the INSERT and goes on to ignore the cursor.

--
insert puter between com & fleet in my address.

Other Threads