这个存储过程是错误的?
应该怎么样改呢?各位帮助一下。
ALTER PROCEDURE [dbo].[PROCE_UpFileSend]
@FileID int,
@FileCode varchar(50),
@FileName varchar(100),
@FileCatalogID int,
@PostfixType varchar(10),
@FileSize int,
@OpID int,
@OrganiseID int,
@UpTime datetime
AS
DECLARE @FileData image
select @FileData=FileData from OAO_IndividualFileInfo Where FileID=@FileID
INSERT INTO OAO_FileInfo(FileCode,FileName,FileCatalogID,PostfixType,FileSize,OpID,
OrganiseID,UpTime,Sign,FileData) VALUES(@FileCode,@FileName,@FileCatalogID,@PostfixType,
@FileSize,@OpID,@OrganiseID,@UpTime,2,@FileData)
------解决方案--------------------select @FileData=FileData from OAO_IndividualFileInfo Where FileID=@FileID
Select FileData=@FileData from OAO_IndividualFileInfo Where FileID=@FileId
对比看看 ........
INSERT INTO OAO_FileInfo(FileCode,FileName,FileCatalogID,PostfixType,FileSize,OpID,
OrganiseID,UpTime,Sign,FileData) VALUES(@FileCode,@FileName,@FileCatalogID,@PostfixType,
@FileSize,@OpID,@OrganiseID,@UpTime,2,@FileData)
这是在存储里的么?
还有,你把错误贴出来看看..
------解决方案--------------------ALTER PROCEDURE [dbo].[PROCE_UpFileSend]
@FileID int,
@FileCode varchar(50),
@FileName varchar(100),
@FileCatalogID int,
@PostfixType varchar(10),
@FileSize int,
@OpID int,
@OrganiseID int,
@UpTime datetime
AS
Begin --Start Procedure
DECLARE @FileData image
select @FileData=FileData from OAO_IndividualFileInfo Where FileID=@FileID
INSERT INTO OAO_FileInfo(FileCode,FileName,FileCatalogID,PostfixType,FileSize,OpID,
OrganiseID,UpTime,Sign,FileData) VALUES(@FileCode,@FileName,@FileCatalogID,@PostfixType,
@FileSize,@OpID,@OrganiseID,@UpTime,2,@FileData)
End --Finish Procedure
------解决方案--------------------对于局部变量,text、ntext 和 image 数据类型无效。
------解决方案--------------------有可能是@FileData 不能定为text、ntext 和 image 数据类型无效。