Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Returning an Image
Message
De
16/08/2005 17:22:05
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Returning an Image
Divers
Thread ID:
01041474
Message ID:
01041474
Vues:
69
I am attempting to write a stored procedure that will return an Image field as an OUTPUT parameter, but get the error "The assignment operator operation cannot take a image data type as an argument." Any ideas on how I can do this? Here's the Stored Proc
IF OBJECT_ID('dbo._CraigTest') IS NOT NULL
	DROP PROC dbo._CraigTest
GO

create procedure [dbo].[_CraigTest]
@TableNoField smallint,
@DbvField varchar(40),
@PK  int output,
@B1  binary(5) output,-- RecLen & Hlocks
@A6  int output,      -- AutoInc
@B10 binary(2) output,-- Checksum
@K12 smallint output, -- Table No
@K14 int output,      -- Modified DDT
@B18 binary(4) output, -- Reserved
@K22 varchar(13) output, -- Patnum/dbvalue
@K35 varchar(33) output, -- Name
@B68 binary(61) output,  -- DSO
@T128 image output      -- DSO

as
Select top 1
        @PK  = pk,
        @B1 = B1,
        @A6 = A6,
	@B10  =  B10,
	@K12  =  K12,
	@K14  =  K14,
	@B18  =  B18,
	@K22  =  K22,
	@K35  =  K35,
	@B68  =  B68,
	@T128 = T128
  from dbo.tables_dat
  with (index(ix_Tables_dat1), nolock) 
  where K12 = @TableNoField 
	and K22 = @DbvField 
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform