Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 SQL Server Error 'There are no rows in the current

Author  Topic 

ThomasD
Starting Member

2 Posts

Posted - 2011-09-30 : 07:02:12
We are storing/updateting binary data (~125kb) from a file into column of type IMAGE in a SQL Server table
using C++ / OLE-DB with an Accessor like CCommand<CAccessor<MyAccessor>> / ISequentialStream

Since many of years this works fine, but now we have a constellation on one server where we get an error.
On this server some special data files produce this error by storing it, many other not.
We took this data files to an other server, but there it works fine. The problem seems to be on that server.

Here is the output of Profiler which shows that error. Curious are the 2 lines with the same aktion
SP:StmtStarting UPDATE [AttribImage] SET [value]=@Param000004
SP:StmtStarting UPDATE [AttribImage] SET [value]=@Param000004
Exception Error: 16931, Severity: 16, State: 2
User Error Message There are no rows in the current fetch buffer.

On the server where the test succeeded, there was only one update statement (SP:StmtStarting) in Profiler output
SP:StmtStarting UPDATE [AttribImage] SET [value]=@Param000004
SP:StmtCompleted UPDATE [AttribImage] SET [value]=@Param000004


??? ANY IDEA ???

Server data:
------------
Microsoft Windows XP Professional Service Pack 3 (Version 5.1.2600) 4 Processor Intel
DBMS:'9.00.4273.00 (SP3, Standard Edition (64-bit), Latin1_General_CI_AS)'


Full Profiler output (error condition)
-----------------------------------------------------------------------------------------------------------------------------------------------------
RPC:Starting declare @p1 int set @p1=NULL declare @p3 int set @p3=229378 declare @p4 int set @p4=294916 declare @p5 int set @p5=NULL
exec sp_cursoropen @p1 output,N'SELECT value FROM AttribImage WHERE oid = 0x18477E AND aid = 230',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5
SP:StmtStarting SELECT value FROM AttribImage WHERE oid = 0x18477E AND aid = 230
SP:StmtCompleted SELECT value FROM AttribImage WHERE oid = 0x18477E AND aid = 230
RPC:Completed declare @p1 int set @p1=180150003 declare @p3 int set @p3=2 declare @p4 int set @p4=4 declare @p5 int set @p5=-1
exec sp_cursoropen @p1 output,N'SELECT value FROM AttribImage WHERE oid = 0x18477E AND aid = 230',@p3 output,@p4 output,@p5 output
select @p1, @p3, @p4, @p5
RPC Output Parameter 180150003
RPC Output Parameter 2
RPC Output Parameter 4
RPC Output Parameter -1
RPC:Starting exec sp_cursoroption 180150003,1,0
RPC:Completed exec sp_cursoroption 180150003,1,0
RPC:Starting exec sp_cursorfetch 180150003,32,1,1
SP:StmtStarting FETCH API_CURSOR0000000000014854
SP:StmtCompleted FETCH API_CURSOR0000000000014854
RPC:Completed exec sp_cursorfetch 180150003,32,1,1
RPC:Starting exec sp_cursoroption 180150003,3,1
RPC:Completed exec sp_cursoroption 180150003,3,1
RPC:Starting exec sp_cursor 180150003,40,1
SP:StmtStarting FETCH API_CURSOR0000000000014854
RPC:Completed exec sp_cursor 180150003,40,1
RPC:Starting exec sp_cursor 180150003,33,1,N'AttribImage',@value=0x62694C5A00740200789CECBB095C1357BFFF7FCE4C12C266084B10151340C0958828EE061070A........ (124kb of data)
SP:StmtStarting UPDATE [AttribImage] SET [value]=@Param000004
SP:StmtStarting UPDATE [AttribImage] SET [value]=@Param000004
Exception Error: 16931, Severity: 16, State: 2
User Error Message There are no rows in the current fetch buffer.
User Error Message The statement has been terminated.
RPC:Completed exec sp_cursor 180150003,33,1,N'AttribImage',@value=0x62694C5A00740200789CECBB095C1357BFFF7FCE4C12C266084B10151365249673C67A2E8C7F4F....... (124kb of data)
RPC:Starting exec sp_cursorclose 180150003
RPC:Completed exec sp_cursorclose 180150003
------------------------------------------------------------------------------------------------------------------------------------------------------------




visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-30 : 07:30:15
duplicate http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=166114
please dont cross post

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -