Closed sagarcasm closed 1 year ago
@sagarcasm Use Length:50
key in your param as used here: https://github.com/ibmdb/node-ibm_db/blob/master/test/test-array-insert.js#L25
I see data as Data: [ email,email2 ]
in your shared code, should it be Data: [ email1,email2 ]
?
Please share the contents of EMAIL1 and EMAIL2. Better to share small test.js file to repro the issue. Thanks.
@sagarcasm Hope your issue get resolved by correcting the application code. Let us know otherwise. Closing the issue now. Thanks.
Operating System Name:
MAC Apple M1 MAX
Memeory 32Gb
db2level output from clidriver if in use:
Target Db2 Server Version:
node.js Version: v14.21.1
ibm_db version: "ibm_db": "3.1.0"
Steps to Reproduce:
I am using bulk data uploads to the Table which has 2 email columns - after successfully running the scrip with 10 records I noticed that the email get truncated after they are inserted in the table.
Below is the table DDL
I am using the below code to add the bulk data with parameterized query
I tried a simple insert but later also switched to insert by casting to VARCHAR
Below is how the insert array looks like
Below is how the data gets inserted
This issue happens for both email fields, can you help me understand what should the email columns be cast as? while printing the data before
await stmt.bindSync(data);
I get all the values appropriately but post insert when I check the db they are truncated from the right.