Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Long varchar or text data type???

Posted on 2003-03-22
8
Medium Priority
?
1,276 Views
Last Modified: 2012-08-13
I created a table that consists of several columns and data field.  I need to have a column that has at least 2000 chars to be stored in it.  I tried the long varchar data type but after several data entry, record truncation happens. After this, I changed the data type to text. Again, record truncation happened.

Why is this happening and what caused it? How will I able to fix this problem? One last thing, I'm just wondering if this is possible, can I use Rich Text to store data into this column??? If yes, how can I do that?
0
Comment
Question by:Sandy Kalugdan
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 3

Accepted Solution

by:
Moliere earned 1500 total points
ID: 8190845
Sybase has a limit for char fields which depends on the page size. If you need more space, contact your DBA to increase the pagesize on the database.

In addition, you must increase the Page Size so it can handle more characters per row.
0
 
LVL 4

Expert Comment

by:gletiecq
ID: 8192782
Text and binary data doesn't get stored on the same page as the data rows and isn't limited to page size.  I've pushed RTF documents into text datatypes before -- all you do is read the document into a variable and use the writetext command to chunk it out to the server.  Readtext is the command to chunk it back in.  Otherwise, if you just select the column it truncates the data.

Greg
0
 
LVL 3

Author Comment

by:Sandy Kalugdan
ID: 8192973
I think I'm having some light on my problem. I'll try them both; increase the page size and use the writetext/readtext commands.

greg, if you can give me a more details on how to do with the readtext/writetext. I'll appreciate it more.
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 4

Expert Comment

by:gletiecq
ID: 8196022
Both are well documented in the online DynaText support files.  Basically, you set up a textpointer and use it to read 32K chunks into a BLOB where you assemble the full data stream.  I haven't done this in a while, so off the top of my head I can't give you the specific method to do this.  If you want, you can go to www.sybase.com and search on readtext or writetext and there are plenty of examples on how it's done.

Be really careful about changing page size.  Backups using the other pagesize may not be useable anymore, and any proxy tables connecting to dbservers with different page sizes may not perform correctly.  It's not a chenge to be taken lightly in an enterprise environment.  Besides, pagesize has nothing at all to do with this issue.

Greg
0
 
LVL 13

Expert Comment

by:alpmoon
ID: 8214392
I agree with suggestions, but are you using ASE or ASA? (I am asking because there is no longvarchar in ASE)
0
 
LVL 3

Author Comment

by:Sandy Kalugdan
ID: 8214613
I'm using the ASA.
0
 
LVL 13

Expert Comment

by:alpmoon
ID: 8215286
The previous answers are not relevant if you are using ASA. In terms of data storage there is no difference between text and long varchar in ASA. You should be able to store Kilobytes of strings by using either text or long varchar.

I think the problem is related to the method used to insert data or maybe you don't see the remaining of the string when you selected. How do you insert or update these strings? How do you check whether the string is completely stored or not?
0
 
LVL 13

Expert Comment

by:alpmoon
ID: 8215496
I need to add that you can use readtext and writetext commands in both ASA and ASE. You can check the example for ASA at http://sybooks.sybase.com/onlinebooks/group-sas/awg0603e/dbrfen6/@Generic__BookView

 
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

Use this step by step method when setting up QuickBooks Online. They will allow you to explore the various features of the advanced settings available to you.
If you need to complete a Physical to Virtual (P2V), Virtual to Virtual (V2V) conversion to a VMware product (VMware Workstation, Player or VMware vSphere (ESXi) ) for FREE, then there is some good news...
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
The Relationships Diagram is a good way to get an overall view of what a database is keeping track of. It is also where relationships are defined. A relationship specifies how two tables connect to each other. As you build tables in Microsoft Ac…
Suggested Courses

571 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