cretz/node-tds — Issue #11: nvarchar field error
Author: jiangjianxiao
Created: 2012-01-20 06:57:58+00:00
State: open

```
create table test (id int identity,name nvarchar(50) null);

go

declare @i int

set @i=0

while @i<2000 begin

insert into test default values;
set @i=@i+1
end
```
-----
```
var stmt=conn.createStatement('select id,name from test order by id');
stmt.on('row',function(row){
console.log(row);
console.log(row.getValue('id'),row.getValue('name'));

});
stmt.execute();
```

----------
```
{ type: 209,
name: 'ROW',
handlerFunction: 'row',
metadata:
{ type: 129,
name: 'COLMETADATA',
handlerFunction: 'colmetadata',
columns: [ [Object], [Object] ],
columnsByName: { id: [Object], name: [Object] } },
values: [ { length: 4, buffer: }, { length: -1 } ] }
578 null
{ type: 209,
name: 'ROW',
handlerFunction: 'row',
metadata:
{ type: 129,
name: 'COLMETADATA',
handlerFunction: 'colmetadata',
columns: [ [Object], [Object] ],
columnsByName: { id: [Object], name: [Object] } },
values:
[ { length: 4, buffer: },
{ length: 16,
buffer: } ] }
262723 '㠀\u0002\u0000￿䓑\u0002＀퇿'

C:\Users\jjx\AppData\Roaming\npm\node_modules\tds\lib\tds-client.js:210
throw err;
^
Error: Unrecognized type: 69
at TokenStreamPacket._getTokenFromType (C:\Users\jjx\AppData\Roaming\npm\nod
e_modules\tds\lib\tokenstream.packet.js:67:15)
at TokenStreamPacket.nextToken (C:\Users\jjx\AppData\Roaming\npm\node_module
s\tds\lib\tokenstream.packet.js:75:18)
at TdsClient._handleToken (C:\Users\jjx\AppData\Roaming\npm\node_modules\tds
\lib\tds-client.js:197:35)
at TdsClient. (C:\Users\jjx\AppData\Roaming\npm\node_modules\tds\
lib\tds-client.js:167:19)
at Socket. (C:\Users\jjx\AppData\Roaming\npm\node_modules\tds\lib
\tds-client.js:2:59)
at Socket.emit (events.js:67:17)
at TCP.onread (net.js:347:14)
```