Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Get text

7 views
Skip to first unread message

Per Lundkvist

unread,
Jul 18, 2001, 3:10:31 AM7/18/01
to
I have solved an earlier problem with getting more than 4000 characters from
a field in SQL-server 7.0.
I updated MDAC!

But now my problem is that I have Stored Procedure that have get the text by
returning a OUTPUT-variable with text.
The variable is of type nvarchar(4000)

I thought that I just could change it to ntext which is also the datatype of
the field because it has to keep more than 4000 characters.
BUT, then I realized that a OUTPUT variable can't be of type ntext??!!

How can I return largetext in a OUTPUT-variable?

Per Lundkvist.


Andrew J. Kelly

unread,
Jul 18, 2001, 7:40:06 AM7/18/01
to
According to Booksonline nText is a valid output parameter although I have
never tried it:

OUTPUT

Indicates that the parameter is a return parameter. The value of this option
can be returned to EXEC[UTE]. Use OUTPUT parameters to return information to
the calling procedure. Text, ntext, and image parameters can be used as
OUTPUT parameters. An output parameter using the OUTPUT keyword can be a
cursor placeholder


--
Andrew J. Kelly, SQL Server MVP
Targitmail


"Per Lundkvist" <per.lu...@comsol.se> wrote in message
news:uWkDog1DBHA.2012@tkmsftngp05...

Per Lundkvist

unread,
Jul 18, 2001, 8:01:19 AM7/18/01
to
Hmm, strange...but you are right.
I use it this way:

DECLARE @ntext_variable ntext
SELECT @ntext_variable = thetext FROM texttable WHERE id = 10

But it is then I get the error message:
"Error 409: The assignment operator operation cannot take a ntext data type
as an argument."

So the problem is that I can't get the text I get from the result into my
OUTPUT-variable so I can return it to the browser.

Per L.


"Andrew J. Kelly" <ake...@targitmail.com> wrote in message
news:e#BC093DBHA.1828@tkmsftngp05...

Andrew J. Kelly

unread,
Jul 18, 2001, 9:57:23 AM7/18/01
to
I don't use ntext much so I can't answer why that is so. But why don't you
just use a RecordSet to get the results to the front end?

--
Andrew J. Kelly, SQL Server MVP
Targitmail


"Per Lundkvist" <per.lu...@comsol.se> wrote in message

news:#hkXID4DBHA.508@tkmsftngp02...

Per Lundkvist

unread,
Jul 18, 2001, 11:12:39 AM7/18/01
to
Yes I do that now, but as I still have to call for my Stored Procedure it is
faster if it could get the text as well as all the other things.
But now it works, that is the important thing so...

Thank you for all help!

Per L.
www.comsol.com


"Andrew J. Kelly" <ake...@targitmail.com> wrote in message

news:##iahK5DBHA.496@tkmsftngp05...

0 new messages