Adam writes "The following procedure is being called in ASP and seems to go through fine but the image doesnt get stored and the link is never made. I'm fixing someone elses mess so can't really stop storing images in the database and can't seperate the steps since ASPupload which is how I am getting the files into the database doesnt return anything from it's query (helpfully). I suppose the question could be better worded (and more useful for others) "How can I track a procedure when I can't directly see the output" Please take pity on a poor soul who has had half a system dumped in his lap.CREATE PROCEDURE [dbo].[insertImage] @coid uniqueidentifier,@keywords nvarchar(100),@uid smallint,@sid smallint,@name nvarchar(255),@width int,@height int,@size int,@type nvarchar(10),@stream bit,@catid smallint,@image imageASIF @coid = null INSERT INTO [Image] (im_Data, im_Keywords, im_Author, im_Site, im_title, im_width, im_height, im_size, im_type, im_stream, im_category) VALUES (@image, @keywords, @uid, @sid, @name, @width, @height, @size, @type, @stream, @catid)ELSE DECLARE @guid uniqueidentifier SET @guid = NEWID() PRINT CONVERT(varchar(255), @guid)/*commented out as not necessary*/ /*IF @sid = null AND @keywords = null SELECT @sid = co_site, @keywords = co_Keywords FROM Content WHERE co_ID = @coid*/ INSERT INTO [Image] (im_ID, im_Data, im_Keywords, im_Author, im_Site, im_title, im_width, im_height, im_size, im_type, im_stream, im_category) VALUES (@guid, @image, @keywords, @uid, @sid, @name, @width, @height, @size, @type, @stream, @catid) INSERT INTO [ImageLink] (il_Content, il_Image) VALUES (@coid, @guid)GO
"