Solved

can DB library support char more than 255

Posted on 2002-05-31
3
229 Views
Last Modified: 2010-05-18
I am facing the problem that when i select a record from a column more than 255 bytes(varchar), data is truncated at 255 bytes. how can i solve this problem?
0
Comment
Question by:glt10
  • 2
3 Comments
 
LVL 5

Expert Comment

by:spcmnspff
ID: 7047067
The Varchar datatype can be as large as 8000 characters, so something is is askew.  What sor of application are you using to select the data are connected through an ODBC connection?
0
 

Author Comment

by:glt10
ID: 7050273
hi
yes Varchar can support until 8000 but when i select the record, my result has been truncated to 255.
I am using SQL dblibrary, Sql Direct access API.
0
 
LVL 5

Accepted Solution

by:
spcmnspff earned 50 total points
ID: 7051105
Sheeeesh that's old.  That's a legacy technology from the old SyBase days!  This is a physical limitation of the API function. Is it possible to switch to ADO and avoid the API calls altogether?  If not try breaking it up and concatenating it on the front end.  Something like:

Select Left(MyField,255) A, Right(MyFeild(Len(MyField - 255)

Now you've accomodated for a possible lentgh of 510, and so on  . . .  Now just concatenate the fiekd in the fromnt end.

I know it's not fun but  . . .
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduced in Microsoft SQL Server 2005, the Copy Database Wizard (http://msdn.microsoft.com/en-us/library/ms188664.aspx) is useful in copying databases and associated objects between SQL instances; therefore, it is a good migration and upgrade tool…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now