Nullable varchar columns with null values is throwing index out of bounds exception. #33

tdarsan opened this Issue Nov 22, 2012 · 0 comments


None yet
1 participant

tdarsan commented Nov 22, 2012

Deletion of this line, as part of #12, in file is causing issues with nullable varchar columns and is throwing index out of bounds exception. Eg:- a varchar(9) nullable column with null values in it will thow an exception.

if val.length is 0xFFFF then val.length = -1

@martijndeh martijndeh added a commit to martijndeh/node-tds that referenced this issue Feb 12, 2013

@martijndeh martijndeh Update src/
I assume a nullable column with a value's length of 0xFFFF should actually become null (see #33). The length is set based on emptyPossible so that is does not break the logic in the isNull method.

I do not know if a length of 0xFFFF should always be null or perhaps only for uint16LE length type or VarChar sql types. I would appreciate it if anyone could check this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment