Wednesday, March 28, 2012

Received error code 0x80040e57

I've check out that this error code says: A literal value in the command overflowed the range of the type of the associated column.

I received the error message when inserting large block data into a image column in SQL Server 2000. As I know, image support max 2G data to store. I use the C code function below to insert the data:

DBCreateParamBinary (hStmt, "", DB_PARAM_INPUT,&(pMonitorDBData->SampDat),NUM_SAMPLES_SETDBMONITOR*sizeof(float64) );

in which, the NUM_SAMPLES_SETDBMONITOR*sizeof(float64) stands for the data length by byte. and ,&(pMonitorDBData->SampDat) stands for the pointer address of the data block. (pls note: NUM_SAMPLES_SETDBMONITOR*sizeof(float64) = 4096*8=32768 bytes)

In addation, I've tried to use certain numbers instead of "NUM_SAMPLES_SETDBMONITOR*sizeof(float64)", and I found I could only set this value up to 8003 bytes. If 8003 above, this error message would be received.

What should I do with this issue? Any help?
Thanks a million!

I believe that you want to construct your table such that your images are out of row to avoid the 8k row item limit.

http://msdn2.microsoft.com/en-us/library/ms173530.aspx

Hope this helps,

John Gordon (MSFT)

No comments:

Post a Comment