OleDb DataReader Close is hanging

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi - i'm using an OleDBDataReader to get results from a stored procedure and
it is hanging on the Close() call on the Data Reader. When I do a Sql trace I
see a SQL_NO_DATA_FOUND error but i'm not sure what it means or how to debug
it. I am using ADO.NET 1.1, Sql Server 2000, and driver version
2000.86.1830.00

Thanks.


Raccoon 1e48-6cc EXIT SQLGetData with return code 0 (SQL_SUCCESS)
HSTMT 16111FA8
UWORD 1
SWORD -8 <SQL_C_WCHAR>
PTR 0x00201E68 [ 18] "555555555"
SQLLEN 4094
SQLLEN * 0x15BAF97C (18)

Raccoon 1e48-6cc ENTER SQLFetch
HSTMT 16111FA8

Raccoon 1e48-6cc EXIT SQLFetch with return code 100
(SQL_NO_DATA_FOUND)
HSTMT 16111FA8

Raccoon 1e48-6cc ENTER SQLMoreResults
HSTMT 16111FA8

Raccoon 1e48-6cc EXIT SQLMoreResults with return code 100
(SQL_NO_DATA_FOUND)
HSTMT 16111FA8

Raccoon 1e48-6cc ENTER SQLFreeStmt
HSTMT 16111FA8
UWORD 0 <SQL_CLOSE>

Raccoon 1e48-6cc EXIT SQLFreeStmt with return code 0 (SQL_SUCCESS)
HSTMT 16111FA8
UWORD 0 <SQL_CLOSE>

Raccoon 1e48-6cc ENTER SQLFreeHandle
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 16111FA8

Raccoon 1e48-6cc EXIT SQLFreeHandle with return code 0 (SQL_SUCCESS)
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 16111FA8

Raccoon 1e48-6cc ENTER SQLDisconnect
HDBC 16111CC0

Raccoon 1e48-6cc EXIT SQLDisconnect with return code 0 (SQL_SUCCESS)
HDBC 16111CC0

Raccoon 1e48-6cc ENTER SQLFreeHandle
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 16111CC0

Raccoon 1e48-6cc EXIT SQLFreeHandle with return code 0 (SQL_SUCCESS)
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 16111CC0
 
Try using the Command.Cancel method before you use Close.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

Mark said:
Hi - i'm using an OleDBDataReader to get results from a stored procedure
and
it is hanging on the Close() call on the Data Reader. When I do a Sql
trace I
see a SQL_NO_DATA_FOUND error but i'm not sure what it means or how to
debug
it. I am using ADO.NET 1.1, Sql Server 2000, and driver version
2000.86.1830.00

Thanks.


Raccoon 1e48-6cc EXIT SQLGetData with return code 0
(SQL_SUCCESS)
HSTMT 16111FA8
UWORD 1
SWORD -8 <SQL_C_WCHAR>
PTR 0x00201E68 [ 18] "555555555"
SQLLEN 4094
SQLLEN * 0x15BAF97C (18)

Raccoon 1e48-6cc ENTER SQLFetch
HSTMT 16111FA8

Raccoon 1e48-6cc EXIT SQLFetch with return code 100
(SQL_NO_DATA_FOUND)
HSTMT 16111FA8

Raccoon 1e48-6cc ENTER SQLMoreResults
HSTMT 16111FA8

Raccoon 1e48-6cc EXIT SQLMoreResults with return code 100
(SQL_NO_DATA_FOUND)
HSTMT 16111FA8

Raccoon 1e48-6cc ENTER SQLFreeStmt
HSTMT 16111FA8
UWORD 0 <SQL_CLOSE>

Raccoon 1e48-6cc EXIT SQLFreeStmt with return code 0
(SQL_SUCCESS)
HSTMT 16111FA8
UWORD 0 <SQL_CLOSE>

Raccoon 1e48-6cc ENTER SQLFreeHandle
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 16111FA8

Raccoon 1e48-6cc EXIT SQLFreeHandle with return code 0
(SQL_SUCCESS)
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 16111FA8

Raccoon 1e48-6cc ENTER SQLDisconnect
HDBC 16111CC0

Raccoon 1e48-6cc EXIT SQLDisconnect with return code 0
(SQL_SUCCESS)
HDBC 16111CC0

Raccoon 1e48-6cc ENTER SQLFreeHandle
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 16111CC0

Raccoon 1e48-6cc EXIT SQLFreeHandle with return code 0
(SQL_SUCCESS)
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 16111CC0
 
Thanks William for the quick reply, but that didn't do the trick. This code
has been running for a long time and this just started happening.

Thanks
Mark

William Vaughn said:
Try using the Command.Cancel method before you use Close.

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------

Mark said:
Hi - i'm using an OleDBDataReader to get results from a stored procedure
and
it is hanging on the Close() call on the Data Reader. When I do a Sql
trace I
see a SQL_NO_DATA_FOUND error but i'm not sure what it means or how to
debug
it. I am using ADO.NET 1.1, Sql Server 2000, and driver version
2000.86.1830.00

Thanks.


Raccoon 1e48-6cc EXIT SQLGetData with return code 0
(SQL_SUCCESS)
HSTMT 16111FA8
UWORD 1
SWORD -8 <SQL_C_WCHAR>
PTR 0x00201E68 [ 18] "555555555"
SQLLEN 4094
SQLLEN * 0x15BAF97C (18)

Raccoon 1e48-6cc ENTER SQLFetch
HSTMT 16111FA8

Raccoon 1e48-6cc EXIT SQLFetch with return code 100
(SQL_NO_DATA_FOUND)
HSTMT 16111FA8

Raccoon 1e48-6cc ENTER SQLMoreResults
HSTMT 16111FA8

Raccoon 1e48-6cc EXIT SQLMoreResults with return code 100
(SQL_NO_DATA_FOUND)
HSTMT 16111FA8

Raccoon 1e48-6cc ENTER SQLFreeStmt
HSTMT 16111FA8
UWORD 0 <SQL_CLOSE>

Raccoon 1e48-6cc EXIT SQLFreeStmt with return code 0
(SQL_SUCCESS)
HSTMT 16111FA8
UWORD 0 <SQL_CLOSE>

Raccoon 1e48-6cc ENTER SQLFreeHandle
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 16111FA8

Raccoon 1e48-6cc EXIT SQLFreeHandle with return code 0
(SQL_SUCCESS)
SQLSMALLINT 3 <SQL_HANDLE_STMT>
SQLHANDLE 16111FA8

Raccoon 1e48-6cc ENTER SQLDisconnect
HDBC 16111CC0

Raccoon 1e48-6cc EXIT SQLDisconnect with return code 0
(SQL_SUCCESS)
HDBC 16111CC0

Raccoon 1e48-6cc ENTER SQLFreeHandle
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 16111CC0

Raccoon 1e48-6cc EXIT SQLFreeHandle with return code 0
(SQL_SUCCESS)
SQLSMALLINT 2 <SQL_HANDLE_DBC>
SQLHANDLE 16111CC0
 
Back
Top