?
Solved

Long varchar or text data type???

Posted on 2003-03-22
8
Medium Priority
?
1,222 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
[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
  • 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
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 
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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

An introduction to the wonderful sport of Scam Baiting.  Learn how to help fight scammers by beating them at their own game. This great pass time helps the world, while providing an endless source of entertainment. Enjoy!
In this modest contribution, I want to share with the IT community (especially system administrators, IT Support Engineers and IT Help Desks) about Windows crashes/hangs and how to deal with these particular problems.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses

764 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