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
 General SQL Server Forums
 New to SQL Server Programming
 Update Mistery

Author  Topic 

John_Idol
Starting Member

39 Posts

Posted - 2007-04-27 : 11:53:21
Hi all,

I got this stored procedure, a simple update.

I am executing it from some .NET code. It doesn't throw errors, parameters are initialized as they're supposed to be, and the query affect 1 row as expected (I investigated about all this stuff running several debug sessions).

Problem is... record is not updated.

I have the feeling that image data type (@File) is messing everything up - (don't like that datatype but I gotta do some mainteinment on an old application).

Hope someone can help!

Cheers,

Giovanni

ALTER PROCEDURE [dbo].[p_QualityIAAttachments_Update]

(

@AttachmentID int

,@UpdatedBy nvarchar(25)

,@ContentType nvarchar(50)

,@File image

,@Description nvarchar(200)

)

AS

Update

tbl_QualityIA_Attachments

set

[Updated By] = @UpdatedBy

,Type = @ContentType

,[File] = @File

,[Description] = @Description

where

AttachmentID = @AttachmentID

harsh_athalye
Master Smack Fu Yak Hacker

5581 Posts

Posted - 2007-04-27 : 11:59:22
Try running the UPDATE statement from QA excluding the image column and see whether update is happening properly.

Harsh Athalye
India.
"The IMPOSSIBLE is often UNTRIED"
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-04-27 : 12:13:45
do select @@rowcount at the end of the sproc and see what that returns you.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page
   

- Advertisement -