stored procedures - Dynamic query returning the query instead of the result -


below part of stored procedure convert image varbinary format inserted in table .the column of table in image needs inserted of varbinary datatype. column filestream column. problem when execute query returns me query instead of casted data

begin declare @sql varchar(2000) declare @img varbinary(max) declare @productimageurl varchar(max)='e:\3840x2400.jpg'  set @sql= n'declare @test varbinary(max);select @test = cast(bulkcolumn varbinary(max))  openrowset(bulk '''+@productimageurl+''', single_blob ) productimage print @test' --print @img --print @sql exec(@sql) end 

could suggest me how data instead of query . appreciated . thanks..


Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -