September 30, 2011 at 4:34 am
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 MessageThere 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:StmtStartingUPDATE [AttribImage] SET [value]=@Param000004
SP:StmtCompletedUPDATE [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:StmtCompletedSELECT 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 Parameter180150003
RPC Output Parameter2
RPC Output Parameter4
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:StmtCompletedFETCH 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 MessageThere are no rows in the current fetch buffer.
User Error MessageThe 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
------------------------------------------------------------------------------------------------------------------------------------------------------------
September 30, 2011 at 5:55 am
Duplicate post. Replies here: http://www.sqlservercentral.com/Forums/FindPost1183645.aspx.
-- Gianluca Sartori
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply