Showing posts with label associated. Show all posts
Showing posts with label associated. Show all posts

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)

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)

Friday, March 9, 2012

re-associate "dbo" user with "sa" login

Once "dbo" user on a particular db has been associated with a specific login
( "Login1") , how to re-associate it with its default login ( "sa" ) ?
My ultimate goal is to add user "User1" to this db and associate it with
login "Login1" . but to do that apparently I need to de-associate "Login1"
login from "dbo" user.It sounds like the user is the database owner. You can
change the owner to sa by executing the following in the
database:
exec sp_changedbowner 'sa'
-Sue
On Thu, 27 Jul 2006 11:15:59 -0700, "John A Grandy"
<johnagrandy-at-yahoo-dot-com> wrote:

>Once "dbo" user on a particular db has been associated with a specific logi
n
>( "Login1") , how to re-associate it with its default login ( "sa" ) ?
>My ultimate goal is to add user "User1" to this db and associate it with
>login "Login1" . but to do that apparently I need to de-associate "Login1"
>login from "dbo" user.
>