Gunter writes "Hi all,We are currently working on a project(SQL Server 2000) in which we should integrate a COM object for file encryption/decryption in a stored procedure. The following source code is working, but we don´t know how to insert the content of the variable @ClearFileOut in a temporary table. The return value is only a single numeric value but we would need a string. Is it possible to define something like a global variable or do you know is there a possibility to work around to get a return value (string) from a stored procedure?The source:SET QUOTED_IDENTIFIER ON GOSET ANSI_NULLS ON GOCREATE PROCEDURE AsymDecryptFile@PrivateKey varchar(255) = '',@CipherFile varchar(255) = '',@ClearDir varchar(255)='',@HashCheck intASDECLARE @object intDECLARE @hr intDECLARE @ClearFileOut varchar(255)DECLARE @source varchar(255)DECLARE @description varchar(255)DECLARE @Tmp varchar(255)--- Create a DynCrypto objectEXEC @hr = sp_OACreate 'DynCrypto.Crypto', @object OUTIF @hr <> 0BEGIN --- Report error EXEC @hr = sp_OAGetErrorInfo @object, @source OUT, @description OUT IF @hr = 0 BEGIN SELECT @Tmp = '(' + @source + ') ' + @description PRINT 'F1:'+@Tmp END RETURNEND--- Call AsymDecrypt EXEC @hr = sp_OAGetProperty @object,'AsymDecryptFile', @ClearFileOut OUT,@PrivateKey,@CipherFile,@ClearDir,@HashCheckIF @hr <> 0BEGIN --- Report error EXEC @hr = sp_OAGetErrorInfo @object, @source OUT, @description OUT IF @hr = 0 BEGIN SELECT @Tmp = '(' + @source + ') ' + @description PRINT 'f2:'+@Tmp END RETURNENDreturnGOSET QUOTED_IDENTIFIER OFF GOSET ANSI_NULLS ON GOThank you very much in advancebest regards gunter"