Sunday, February 12, 2012

can't update table owned by dbo with impersonation account

I am using an impersonation account to execute a procedure via
executenonquery in asp.net. If the table owner is dbo I get the following
error in .net:
input string was not in a correct format.
When I step through my code it actually is saying that permission is denied
on the table. I've given the impersonation account full priveledges on this
table and it still doesn't work. However, if I change the owner of the tabl
e
to somone else it works fine. Any suggestions on how to resolve this would
be greatly appreciated.Can you show us your query?
"ASP Developer" <ASPDeveloper@.discussions.microsoft.com> wrote in message
news:E5FEB9AA-D527-4AC5-9B08-03FD45EDDFAF@.microsoft.com...
>I am using an impersonation account to execute a procedure via
> executenonquery in asp.net. If the table owner is dbo I get the following
> error in .net:
> input string was not in a correct format.
> When I step through my code it actually is saying that permission is
> denied
> on the table. I've given the impersonation account full priveledges on
> this
> table and it still doesn't work. However, if I change the owner of the
> table
> to somone else it works fine. Any suggestions on how to resolve this
> would
> be greatly appreciated.|||Here you go.
TRUNCATE TABLE dbo.MYTABLE
INSERT INTO dbo. MYTABLE(THEID,ERRORFLAG,ERRORCODE,CREATI
ONDATE)
VALUES(@.IDValue ,'Y',@.LocalError,GETDATE())
When I run my code in asp.net I get the error "input string is not in the
correct format"
If I use
sp_changeobject 'MYTABLE', 'newowner'
and run it again it works fine?
"Uri Dimant" wrote:

> Can you show us your query?
> "ASP Developer" <ASPDeveloper@.discussions.microsoft.com> wrote in message
> news:E5FEB9AA-D527-4AC5-9B08-03FD45EDDFAF@.microsoft.com...
>
>

No comments:

Post a Comment