"Invalid column type from bcp client for colid" - How to use sql.UniqueIdentifier column type?
See original GitHub issueHey there,
i am trying to do a bulk insert with 15-20 columns, one of which is a UniqueIdentifier.
My MSSQL table column is a UniqueIdentifier. I am using the node-uuid module to generate a v4 uuid and am trying to get it persisted (unsuccessfully).
var table = new sql.Table('mytable');
table.create = true;
table.columns.add('item_type', sql.VarChar(50), {nullable: false});
table.columns.add('total_events', sql.Int, {nullable: false});
table.columns.add('guid', sql.UniqueIdentifier, {nullable: false});
table.rows.add('aa',5,uuid.v4());
The above code will always throw “Invalid column type from bcp client for colid” Error. What type do i have to use to be able to do the insert?
Issue Analytics
- State:
- Created 8 years ago
- Comments:5
Top Results From Across the Web
Invalid column type from bcp client for colid - Stack Overflow
I'm getting the following error message: Invalid column type from bcp client for colid 1. I'm using node-mssql package.
Read more >bcp error - Invalid column type from bcp client for colid 1
You might be experiencing the following error with bcp when loading text data to SQL Server table;. It is possible to see this...
Read more >Invalid column type from bcp client for colid xx.
I have an issue with transferring some data from prod to uat, the two tables are identical. I first thought this might have...
Read more >SQL UNIQUEIDENTIFIER Data Type - Dofactory
This data type is used as primary key alternative to IDENTITY columns. UNIQUEIDENTIFIER is globally unique, whereas IDENTITY is unique within a table....
Read more >Received an invalid column length from the bcp client for colid ...
To avoid this, try exceeding the data-length of the string datatype in the database table. Hope this helps. Dinesh 3457. score:0. Great piece ......
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

@willmorgan jarekb84 is this issue resolved. i have nullable as true and am getting the same error
@aaronwilliams97 Had the same issue and setting the nullable option fixed it for me.