This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

text field in stored procedure

 
joseph cooper
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a text field defined in the database. I am working with a stored procedures and trying to insert information into this text field. I am receiving this error: "The text, ntext, and image data types are invalid for local variables."

-- code --

declare @Bas_Txt as text
declare @Bas_Cmt_Tx as varchar(200)
set @Bas_Txt = '<HTML> </HTML>'
set @Bas_Cmt_Tx = 'trial setup'

BEGIN
Set NoCount On
Insert into dbo.BASELINE(Bas_Txt, Bas_Cmt_Tx)
Values (@Bas_Txt, @Bas_Cmt_Tx)
END

I have done some looking on google and I am not sure if this can be done. If not, is there a work around?

thanks in advance.
 
stu derby
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Stored procedure languages are (usually) specific to their databases, and have nothing to do with Java; you'll probably have better luck on a forum dedicated to whatever database you are using (I can't tell, I don't recognize that particular stored procedure language).
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34106
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Joseph,
It is ok to ask stored procedure questions here at JavaRanch. I recommend editing your post to put the language/database you are using in the subject. That way people who know that language/database are sure to read your post.
 
joseph cooper
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am working with SQL2000 and windows XP.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic