943,917 Members | Top Members by Rank

Ad:
Jun 24th, 2004
0

Text data type troubles in T-SQL

Expand Post »
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
Similar Threads
Reputation Points: 115
Solved Threads: 7
Practically a Master Poster
Slade is offline Offline
633 posts
since Mar 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Database Design Forum Timeline: Export SQL
Next Thread in Database Design Forum Timeline: Help me make a list of database servers!





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC