How to store all contents of an Intel hex file it on sql server database?

Hi Everyone,

I am reading an Intel hex file of size more than 60KB, using an 'file in' node, which gives output as 'a single Buffer object'.

I have a table with a field of data type varbinary(max) in ms sql server. I am storing the buffer output from 'file in' node directly onto the database using 'node-red-contrib-mssql-plus' node'. Do i need to change the buffer data output from 'file in' to some other data types before storing onto the database or should i use different data type for the table field?

I am getting "The floating point value '1051e40002440346934200' is out of the range of computer representation (8 bytes)." from the database. Please kindly help me to find the mistakes and clear my misunderstandings.

Any help would be really grateful. Thanks

Best Regards,

Can you share your flow please? Also, a screenshot of the MSSQL-PLUS nodes edit dialog.

Hi Steve,

Thanks for your reply.
Here the screenshots of the flow, function node and MSSQL-PLUS nodes:


Best Regards,

duplicate post

As a test, could you set the VarBinary size in the Parameter to match your DB? (e.g. VarBinary(8000))

Also, could you add a debug (set to Show Complete Message) after the "Prepare insert query parameters" function & show me a screenshot of the msg and its properties that are going into the MSSQL-PLUS node?

Hi Steve,

I removed the field from the database table and created a new field with its data type set to varbinary(8000), like you said. Also i have set the query parameter's data type to varbinary(8000) in MSSQL-PLUS node.

And now it works fine :).
I am still not sure what the problem was but now it is working.

Once again, thank you very much for your help Steve.

Best Regards,

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.