Quantcast
Channel: SCN: Message List - SAP Adaptive Server Enterprise (SAP ASE) for Custom Applications
Viewing all articles
Browse latest Browse all 3587

Re: Passing a Text Variable as output parameter in Store Procedure

$
0
0

Sounds like somewhere along the line there's a configuration setting that's not allowing the full value of the text string to be captured (ie, it's getting truncated at some point). ("Duh, Mark!" ?)

 

Could you provide the following:

 

- ASE version (select @@version)

 

- where you're seeing the error (eg, are you getting this error in your application, within a SQL batch script, within a parent proc that's calling sp_test_text)?

 

- how long (in bytes) is the text value you're trying to return (select datalength(<text_string_or_text_variable>))

 

Do you get the error if you submit the following via the 'isql' command line tool?

 

===================

declare @my_out_text text

exec sp_test_text <your_test_int_value>, @my_out output

select datalength(@my_out)

go

===================

 

A simple test ...

 

If the datalength(@my_out) returns a fairly large number (eg, more than 32K), see if reducing the size of the returned text gets you past the error (ie, if you can reduce the text size and get rid of the error, then this would seem to indicate a config setting issue with the application).

 

Could you modify your application to issue 'set textsize 1000' before submitting the stored proc call?  While the proc will still capture the entire contents of the text column, the 'set textsize 1000' command tells the dataserver to limit the number of bytes sent back to the client to the first 1000 bytes of the text value.

 

If this test (limiting returned text to 1000 bytes) eliminates the error, then the next step would be to find the configuration setting in your application that will allow it to process a larger text string ...


Viewing all articles
Browse latest Browse all 3587

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>