我在一个按钮单击中插入图像文件和声音文件。我正在为该任务调用两个存储过程。但问题首先是图像被保存在数据库中,然后声音文件覆盖它。声音文件没有保存在为其分配的单元格中。无法将二进制值插入到SQL Server 2008中
两个存储过程:
ALTER PROCEDURE [dbo].[InsertImageIntoServiceRequest]
(@ServiceRequestID int,
@FileName nvarchar(150),
@Image varbinary(max))
AS
BEGIN
update ServiceRequest
set [email protected], [Image][email protected]
where [email protected]
END
和
ALTER PROCEDURE [dbo].[InsertSoundIntoServiceRequest]
(@ServiceRequestID int,
@FileName nvarchar(150),
@Sound varbinary(max))
AS
BEGIN
update ServiceRequest
set [email protected], [email protected]
where [email protected]
END
当我调试我的ASP.net应用程序,我发现,同时节省了声音文件InsertImageIntoServiceRequest
也越来越打来电话,声音文件与图像文件重叠。
请提出建议。
我想补充一点。我通过会话变量将图像和声音文件传递给存储过程。 – Chandrima
你在这张桌子上有触发器吗? –
没有... @Gordon Linoff – Chandrima