Sql 用Insert插入二进制
CREATE PROCEDURE addImage
(
@bin image,
@ID varchar(50)
)
AS
DECLARE @ptrval binary(16)
UPDATE Smart_Config SET D_LogoImage = '' WHERE D_GUID=@ID
--IF DATALENGTH(@bin)<4096
--SET @bin = SUBSTRING(@bin, 1, DATALENGTH(@bin)-1)
SELECT @ptrval = TEXTPTR(D_LogoImage) FROM Smart_Config WHERE D_GUID = @ID
UPDATETEXT Smart_Config.D_LogoImage @ptrval null NULL @bin