?
Solved

can DB library support char more than 255

Posted on 2002-05-31
3
Medium Priority
?
237 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 100 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

752 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