Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating an "Image" data type field in an SQL Table

Status
Not open for further replies.

RileyCat

Programmer
Apr 5, 2004
124
US
Does anybody have any suggestions for how to update a record in an SQL table, specifically an "image" data type field?

Here's my code . . . BUT IT DOESN'T WORK! ARGH!!!!! I'm getting desperate!

Code:
spSaveCpnScanImagesTest
@Mfr		int,
@CpnOffer	int,
@RptOffer	int,
@CpnFrontImg	image,
@CpnBackImg	image

update	CpnScan
set 	CpnFrontImg = @CpnFrontImg,
	CpnBackImg = @CpnBackImg
where	Mfr = @Mfr and
	CpnOffer = @CpnOffer and
	RptOffer = @RptOffer
[\code]

Now, I know the first thing you're going to ask is . . . Is there a matching record in the database.  Yes, there is.

I am calling this sp from C# and can insert using this same logic, but when I try to update the same record, it does not work.

HELP!  PLEASE!

Thank you!




Stay Cool Ya'll!    [smile2]

-- Kristin
 
Look up UpdateText and WriteText in Books Online.

"NOTHING is more important in a database than integrity." ESquared
 
You'll have to check how the data is being sent to the sp from your C# code. You have to create a bytestream and pass that to your paramater in order to update an image column.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top