RE: Long character fields and Windows 2003

Graham Hodges <[email protected]>
Newsgroups gmane.comp.lang.4gl.fourjs.user
Message-ID <[email protected]>
Is anyone at 4Js planning to respond to this?
It's potentially a very serious problem
Graham Hodges

-----Original Message-----
From: Graham Hodges [mailto:[email protected]] 
Sent: 13 June 2005 09.10
To: [email protected]
Subject: [fourjs-users] Long character fields and Windows 2003



We have SQL server 2000 8.00.760 running under windows server 2003 

A variable was defined as char(500). 
Through SQL, 499 characters of data were saved into a column defined as
varchar(500). 
Enquiring on the data through the application variable returns all
characters. 
The variable was updated (some characters were changed) in the application
and saved back to the database. 
Enquiring on the data through the application returns 244 characters and a
length of 244. 
Enquiring on the data through SQL yields the same results. 
Updating the data to restore the missing 255 characters fails because only
the first 244 characters are returned to a subsequent query although the
debugger suggests that it has written 499 characters.

The variable definition was changed to LIKE <column_name> 
The column was changed to char(500), the schema rebuilt and the program
recompiled.  The error did not occur. 
The column was changed to varchar(500), the schema rebuilt and the program
recompiled.  The update error reappeared and also data returned from the
server was truncated, regardless of the length.

It is also worth noting that the truncation appears to be consistent from
the end of field marker, so if the data is actually 350 characters 255 will
be returned to a char field, but only 95 to a varchar.

Graham Hodges 

**********************************************************************

This email and any files transmitted with it are confidential and

intended solely for the use of the individual or entity to whom they

are addressed. If you have received this email in error please notify

the system manager.



 

This footnote also confirms that this email message has been swept by

MIMEsweeper for the presence of computer viruses.



 

www.mimesweeper.com

**********************************************************************
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.