Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
None
-
Windows Server 2008 R2
IIS 7.5
ASP Classic / ADODB
Description
VARCHAR column values are right padded with NULL charcters in ADODB.
The SQL:
select companyName from company where companyId = 1;
In ASP Classic and ADODB the corresponding byte array of the results is (40 characters?):
77 121 32 67 111 109 112 97 110 121 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
In .NET the string is correct:
77 121 32 67 111 109 112 97 110 121
The above byte array corresponds to "My Company".
Table definition:
CREATE TABLE `company` (
`companyId` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
`companyName` varchar(100) NOT NULL DEFAULT '',
PRIMARY KEY (`companyId`),
UNIQUE KEY `companyName` (`companyName`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;