CREATE PROCEDURE SFilesDelete (@fId uniqueidentifier)
AS
BEGIN
SET NOCOUNT ON;
DELETE from SFiles where stream_id = @fId;
END
GO
ALTER PROCEDURE [dbo].[SFilesInsert]
@fname nvarchar(255)
,@fData varbinary(max)
AS
BEGIN
Declare @fid uniqueidentifier = NEWID();
INSERT INTO SFiles (stream_id, file_stream, name) VALUES (@fId ,@fdata,@fname);
SELECT stream_id, file_stream.PathName() as unc_path FROM SFiles where stream_id = @fId
END
No comments:
Post a Comment