What is the Max length of data type in SQL 6.5

Hi

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 ...

Thanx

KC
explorer007Asked:
Who is Participating?
 
david_levineConnect With a Mentor Commented:
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:
http://support.microsoft.com/support/kb/articles/Q153/2/38.asp?LNG=ENG&SA=TECH

http://support.microsoft.com/support/kb/articles/Q197/9/14.ASP?LNG=ENG&SA=TECH

The latter has examples of inserting TEXT data into SQLServer 6.5
0
 
ahoorCommented:
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?
0
 
ahoorCommented:
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?
0
All Courses

From novice to tech pro — start learning today.