Showing posts with label driver. Show all posts
Showing posts with label driver. Show all posts

Tuesday, March 27, 2012

A cursor with the name deadrow already exists.

I'm trying to track this error from the driver down:
'42000' [-1] '[Microsoft][ODBC SQL Server Driver][SQL Server]A cursor
with the name 'deadrow' already exists. ** AND ** [Microsoft][ODBC SQL
Server Driver][SQL Server]The statement has been terminated.'
[msg='SQL call failed.']."Todd" <talltodd@.hotmail.com> wrote in message
news:eda42e3f.0401090715.5e75fd6f@.posting.google.c om...
> I'm trying to track this error from the driver down:
> '42000' [-1] '[Microsoft][ODBC SQL Server Driver][SQL Server]A cursor
> with the name 'deadrow' already exists. ** AND ** [Microsoft][ODBC SQL
> Server Driver][SQL Server]The statement has been terminated.'
> [msg='SQL call failed.'].

It's not possible to say exactly what happened without more information, but
it seems that your client application has declared a cursor called deadrow
but not closed and deallocated it afterwards. If the same code is then run
again, you will get this error.

Simon|||To add to Simon's response, it's a good practice to explicitly declare
cursors as LOCAL unless you have a reason to do otherwise. This will ensure
the cursor is deallocated when it goes out of scope.

--
Hope this helps.

Dan Guzman
SQL Server MVP

"Todd" <talltodd@.hotmail.com> wrote in message
news:eda42e3f.0401090715.5e75fd6f@.posting.google.c om...
> I'm trying to track this error from the driver down:
> '42000' [-1] '[Microsoft][ODBC SQL Server Driver][SQL Server]A cursor
> with the name 'deadrow' already exists. ** AND ** [Microsoft][ODBC SQL
> Server Driver][SQL Server]The statement has been terminated.'
> [msg='SQL call failed.'].|||Dan Guzman (danguzman@.nospam-earthlink.net) writes:
> To add to Simon's response, it's a good practice to explicitly declare
> cursors as LOCAL unless you have a reason to do otherwise. This will
> ensure the cursor is deallocated when it goes out of scope.

Yeah, but then you cannot declare them as INSENSITIVE, which also is a
good practice, as that saves you from the surprises that keyset-driven
cursors can give you.

Maybe STATIC or FAST_FORWARD are the same as INSENSITIVE, but I have
never managed to grasp the cursor excesses that were added to SQL7.

Besides, INSENSITIVE is ANSI compliant, while LOCAL is not.

There is a database option to make local cursors the default, though.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Actually we don't have a cursor named 'deadrow' it seems so we figure it
coming from the odbc driver for sql server.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Sunday, March 11, 2012

80004005 ODBC SQL Server Driver shared memory or TCP/IP sockets er

Hi all,
I have been getting these errors on simple ASP code on my web site:
|80004005|[Microsoft][ODBC_SQL_Server_Driver][TCP/IP_Sockets]ConnectionWrite_(send()).
|80004005|[Microsoft][ODBC_SQL_Server_Driver]Timeout_expired
|80004005|[Microsoft][ODBC_SQL_Server_Driver][Shared_Memory]SQL_Server_does_not_exist_or_access_denied.
|80004005|[Microsoft][ODBC_SQL_Server_Driver][TCP/IP_Sockets]SQL_Server_does_not_exist_or_access_denied.
|80004005|[Microsoft][ODBC_SQL_Server_Driver]Timeout_expired
The SQL 2000 is Standard Edition, SP3 and OS is Windows 2003 Standard edition.
Previously I never faced this problem before. These errors come
intermittently, at no specific time. It appears randomly at any time.
The only thing I have to do is reboot the server to solve this issue.
please tell me if there's anything to solve this issue.
reboot?
"tapman" wrote:

> Hi all,
> I have been getting these errors on simple ASP code on my web site:
> |80004005|[Microsoft][ODBC_SQL_Server_Driver][TCP/IP_Sockets]ConnectionWrite_(send()).
> |80004005|[Microsoft][ODBC_SQL_Server_Driver]Timeout_expired
> |80004005|[Microsoft][ODBC_SQL_Server_Driver][Shared_Memory]SQL_Server_does_not_exist_or_access_denied.
>
> |80004005|[Microsoft][ODBC_SQL_Server_Driver][TCP/IP_Sockets]SQL_Server_does_not_exist_or_access_denied.
> |80004005|[Microsoft][ODBC_SQL_Server_Driver]Timeout_expired
> The SQL 2000 is Standard Edition, SP3 and OS is Windows 2003 Standard edition.
> Previously I never faced this problem before. These errors come
> intermittently, at no specific time. It appears randomly at any time.
> The only thing I have to do is reboot the server to solve this issue.
> please tell me if there's anything to solve this issue.
>