954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Text data type troubles in T-SQL

Ok here is the issue. I am getting this error when making my sql statement:

"Error 409: The assignment operator operation could not take a text data type as an argument"

Here is the code:

CREATE procedure sf_GetArticle

 @ArtID int,
 @Title nvarchar(200) output,
 @Content text output,
 @Hits int,
 @HitText nvarchar(200) output,
 @UserID nvarchar(20) output
 
 
AS

SELECT

 @ArtID   =  ArtID,
 @Title   =  Title,
 @Content  = Content,
 @Hits   =  Hits,
 @HitText  =  HitText ,
 @UserID  =  UserID
 

FROM sf_articles
WHERE ArtID = @ArtID


IF @@ROWCOUNT = 0
 SET @ArtID = 0
GO




The ultimate goal of this is so I can use this stored procedure to grab these values and use them in asp .net using sql parameters, this method has worked for me before... but I have never used the text data type. It is absolutely needed as the maximum nvarchar of 8000 is simply not enough for what I want it to do.

I am a n00b in t-sql, please help :)

Slade
Practically a Master Poster
633 posts since Mar 2004
Reputation Points: 115
Solved Threads: 7
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You