Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @chunck binary(8000),
- @result_id int
- as
- declare @pointer binary(16),
- @imagelength int,
- @datalength int
- --get the pointer and length to the image column
- select @pointer = textptr(result_image),
- @imagelength = datalength(result_image)
- from dbo.dash_result
- where result_id = @result_id
- if @pointer is null
- update dbo.dash_result
- set result_image = @chunck
- where result_id = @result_id
- else
- begin
- --append the chunck of data to the end
- set @datalength = datalength(@chunck)
- updatetext dbo.dash_result.result_image @pointer @imagelength 0 @chunck
- end
Add Comment
Please, Sign In to add comment