What is the Max length of data type in SQL 6.5


I am running SQL 6.5 server. I created a column in a table and used the 'text' datatype definition.My front end is Visual Basic 6.0. When storing into the database into this field,only a max of 255 characters are stored in the database, which is quite surprising. The rest of the characters are truncated.
I presume, 'text' datatype in SQL 6.5 should be able to store more than that. (16 bytes).Why is this problem occurring. I am not even able to specify the User Defined Data type. When creating a User Defined Data Type, I have to specify the Base Datatype to use and when I specify 'text', I am unable to specify the size and it takes the default to be 16 (bytes if I am correct... How many characters would that make ?).Using varchar and char is not possible since that only takes 255 char.

Please help ...


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

I think this is a VB problem...

The 16 bytes is used for a pointer to the datapages of the text. The text itself can be up to 2Gb.

Possibly your front end does not recognise text datatype, but only varchar which has a max of 255 of course. Also using text datatype in stored procedures is not allowed. Maybe there's the problem?
An INSERT statement can only set the first 256 chars of a TEXT column. To do this properly you need to use the RDO AddNew, AppendChunk and Update methods on an rdoResultset.

The following MS articles should help:


The latter has examples of inserting TEXT data into SQLServer 6.5

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
By the way, are you sure you only have 255 chartacters in the database, or do you only see the first 255 in your output?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.