tedious icon indicating copy to clipboard operation
tedious copied to clipboard

Data type 0x2A has an invalid data length or metadata length

Open pawelrychlik opened this issue 11 years ago • 10 comments

I have bad luck bumping tedious version from 1.12.7 to 1.13.0. I keep getting the following error:

Error: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 4 ("@createdAt"): Data type 0x2A has an invalid data length or metadata length.

Query with params:

insert into app.Certificates (clockSkew, createdAt) values (@clockSkew, @createdAt)
[{"name":"clockSkew","value":331155,"type":"int"},{"name":"createdAt","value":"2015-10-27T18:30:26.260Z","type":"datetime2"}]

My database is hosted on Azure.

pawelrychlik avatar Oct 27 '15 20:10 pawelrychlik

It looks somewhat related to https://github.com/pekim/tedious/issues/320

pawelrychlik avatar Oct 27 '15 20:10 pawelrychlik

Also running into this issue with the 1.13.0 release

(Trying to look at the changelog http://pekim.github.io/tedious/changelog.html but that stops at 1.11.) Is it best to rollback to 1.12.3 ?

I also had trouble with the date parameter (Types.DateTime2)

I put in a javascript date

Sql: MedicalData_ReadByOwnerId params: DEVICEOWNERID=10001 MEASUREMENTTYPE=2 STARTDATE=Sun Sep 27 2015 07:00:00 GMT+0000 (UTC) ENDDATE= INVOKEDBY=10001

{ [RequestError: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 5 ("@STARTDATE"): Data type 0x2A has an invalid data length or metadata length.] message: 'The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 5 ("@STARTDATE"): Data type 0x2A has an invalid data length or metadata length.', code: 'EREQUEST', number: 8016, state: 83, class: 16, serverName: 'xxx', procName: '', lineNumber: 1 } RequestError: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 5 ("@STARTDATE"): Data type 0x2A has an invalid data length or metadata length. at RequestError (/src/everthere/server/node_modules/tedious/lib/errors.js:42:12) at Parser. (/src/everthere/server/node_modules/tedious/lib/connection.js:247:61) at Parser.emit (events.js:107:17) at Parser. (/src/everthere/server/node_modules/tedious/lib/token/token-stream-parser.js:51:15) at Parser.emit (events.js:107:17) at readableAddChunk (/src/everthere/server/node_modules/tedious/node_modules/readable-stream/lib/_stream_readable.js:199:16) at Parser.Readable.push (/src/everthere/server/node_modules/tedious/node_modules/readable-stream/lib/_stream_readable.js:163:10) at Parser.Transform.push (/src/everthere/server/node_modules/tedious/node_modules/readable-stream/lib/_stream_transform.js:133:32) at doneParsing (/src/everthere/server/node_modules/tedious/lib/token/stream-parser.js:82:17)

sentient avatar Oct 28 '15 03:10 sentient

I'll take a look ASAP.

arthurschreiber avatar Oct 28 '15 07:10 arthurschreiber

@sentient changelog seems to have been moved to github/releases at some point https://github.com/pekim/tedious/releases

pawelrychlik avatar Oct 28 '15 09:10 pawelrychlik

@sentient we rolled back to 1.12.7 for now, which works in avoiding the mentioned error.

Felix-N avatar Oct 28 '15 09:10 Felix-N

@Felix-N 1.12.3 to be precise ;)

pawelrychlik avatar Oct 28 '15 09:10 pawelrychlik

See #336.

arthurschreiber avatar Oct 28 '15 10:10 arthurschreiber

That was quick :) 1.13.1 works just fine. Thanks! :+1:

pawelrychlik avatar Oct 28 '15 12:10 pawelrychlik

1.13.1 is working for me!

Thank you for this very fast fix @arthurschreiber

sentient avatar Oct 28 '15 21:10 sentient

Hi i m using tedious version ^5.0.3 to connect and fetch procedure from azure table. but i am getting "Data type 0xAF has an invalid data length or metadata length. " error when calling a stored procedure. kindly help. i am in a state of deadlock and not finding any solution.

harshyadav9 avatar Apr 15 '19 18:04 harshyadav9