Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cut-off texts in SQL Server 1

Status
Not open for further replies.

Quadrox

Programmer
May 30, 2002
4
SE
Hi!
I´ve encountered a VERY annoying problem! I have an ASP-web using SQL Server 7. Now I´ve come across the problem with cut-off texts...on the webpage the texts are complete, but when I run a PDF-generating program that uses ASP and PDFlib with Stored Procedures it cuts off texts after 256 characters. I used Query Analyzer to make a SELECT and even then the texts are cut-off. How can this be? The datatype is ntext(16) which was automatically set when I exported the db from Access where it was a Memo field.
 
Hi,
One idea to try out in Query Analysier is to change your result settings. Tools -> Options -> Results and change the maximumn characters per column to a larger number than the preset which is 256. The largest it could be is 8192 i believe.

Hope that gives you a lead
~Deeba~
 
Thanks Deeba, that helped, but sadly not with the PDF-generating part which is the important thing in this case.
When I changed the result value in Query Analyzer it showed the whole texts, so that worked though.

How the rest works is like this:
1. An ASP-code is run executing a couple of stored procedures.
2. The result from the procedures is stored in several variables which then prints the contents to a PDF using PDFLib.

Still, the problem is that texts longer than 256 chars is getting cutoff.
 
I had a similar problem with crystal reports connecting to SQl Server. This was resolved by changing the connection from the native sql driver (which is apparently out of date) to odbc I dont know if this helps at all?

Andy

 
Yeees, problem solved. Found it out myself when I had a look at the stored procedures...obviously the guy who wrote them (not me) never had in mind that the texts could be longer than 256 chars, because the procedures converted the fields to nvarchar(255). I changed the numbers and voila!
Thanks for all the help!

Sincerely,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top