EREQUEST:4012 An invalid tabular data stream (TDS) collation was encountered when SP executed
See original GitHub issueI am trying to send TVP from nodejs to SQL server stored procedure along with other parameters. When the stored procedure is executed the error is triggered.
Expected behaviour:
When i try to execute from the query from SQL server it works fine. I expect the same to happen.
DECLARE @return_value int
DECLARE @priceList LocationPricingTableTyp
DECLARE @primKey uniqueidentifier
SET @primKey = NEWID();
INSERT INTO @priceList
SELECT @primKey, 55676123, 12.0, 15.0,'young','summary';
EXEC @return_value = [dbo].[sp_LocationMaster_Create]
@LocationId = 55676123,
@Language = 'aen',
@IsActive = 1,
@TblLocationPrice = @priceList
SELECT 'Return Value' = @return_value
GO
Actual behaviour:
When i executing from the nodejs
const LocationPricingTableTyp = new sql.Table()
LocationPricingTableTyp.columns.add('LocationId', sql.Int)
LocationPricingTableTyp.columns.add('LowestPrice', sql.Decimal)
LocationPricingTableTyp.columns.add('HighestPrice', sql.Decimal)
LocationPricingTableTyp.columns.add('PriceType', sql.VarChar)
LocationPricingTableTyp.columns.add('Summary', sql.Text)
// Add rows
LocationPricingTableTyp.rows.add(777,12.0,15.0,'young','summary')
SQLrequest.input('LocationId' ,sql.Int ,itemobj.baseId)
SQLrequest.input('Keywords' ,sql.Text ,itemobj.Keywords)
SQLrequest.input('IsDeleted' ,sql.Bit ,true)
SQLrequest.input('IsActive' ,sql.Bit ,true)
SQLrequest.input('TblLocationPrice' ,LocationPricingTableTyp)
SQLrequest.execute("sp_LocationMaster_Create", (err, recordset) => {
if (err){
console.log('Not added due to following error')
console.log(err)
}else{
// send records as a response
console.log('successfully added to Master');
}
});
Error:“An invalid tabular data stream (TDS) collation was encountered.”
Software versions
- NodeJS: 8.9.4
- mssql: 4.2.2
- SQL Server studio: 17.5
Issue Analytics
- State:
- Created 5 years ago
- Comments:13
Top Results From Across the Web
SQLServer An invalid tabular data stream (TDS) collation was ...
P.S. I am using Retry pattern for retrying upon connection reset. java.util.concurrent.ExecutionException: com.microsoft.sqlserver.jdbc.
Read more >KB2563924 - FIX: "The incoming tabular data stream (TDS ...
Cause. This issue occurs because the ODBC driver does not send the data length of the SQL_NULL_DATA value to the table-valued parameter.
Read more >TDS Error - Devart Forums
Since upgrading to Delphi Berlin, I'm now getting the error 'An invalid tabular data stream (TDS) collation was encountered' on SDAC version ...
Read more >[MS-TDS]: Tabular Data Stream Protocol - NET
Packet Data Token and Tokenless Data Streams . ... TDS Type Restrictions . ... When a stored procedure is executed by the server, ......
Read more >The incoming tabular data stream (TDS) protocol stream is ...
The incoming tabular data stream (TDS) protocol stream is incorrect error occurs when running a query using the Connect for ODBC SQL Server ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Table Type Declared
Nodejs Script File nodejs.txt
StoredProcedure
SP.txt
Hi, which version of node-mssql are you using?