question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

CLI0123E: SQL data type out of range. SQLSTATE=HY004

See original GitHub issue

I am having a problem with calling stored procedure that has output parameters. This is the error:

Data is missing from [object Object]
{ Error: [IBM][CLI Driver] CLI0123E  SQL data type out of range. SQLSTATE=HY004  at Error (native)
  errors: [],
  error: '[node-odbc] SQL_ERROR',
  message: '[IBM][CLI Driver] CLI0123E  SQL data type out of range. SQLSTATE=HY004',
  state: 'HY004' }

My code:

ibmdb.open(driver+hostname+port+db+user+psw+protocol, function (err,conn) {
     if (err) return console.log(err);

     var query = "CaLL name.mySP(?,?,?,?,?,?,?,?,?,?,?)";

     var param1 = {ParamType:"INPUT", DataType:1, Data:""};
     var param2 = {ParamType:"INPUT", DataType:1, Data:""};
     var param3 = {ParamType:"INPUT", DataType:1, Data:76145};
     var param4 = {ParamType:"INPUT", DataType:1, Data:0};
     var param5 = {ParamType:"INPUT", DataType:1, Data:0};
     var param6 = {ParamType:"INPUT", DataType:1, Data:0};
     var param7 = {ParamType:"INPUT", DataType:1, Data:""};

     var param8 = {ParamType:"OUTPUT", DataType:1, Data:0};
     var param9 = {ParamType:"OUTPUT", DataType:1, Data:0};
     var param10 = {ParamType:"OUTPUT", DataType:1, Data:""};
     var param11 = {ParamType:"OUTPUT", DataType:1, Data:0};

     conn.query(query, [param1,param2,param3,param4,param5,param6,param7,param8,param9,param10,param11], function (err, data) {
          if (err) console.log(err);
          else console.log(data);

          conn.close(function () { console.log('>> closed'); });
     });
});

I was able to call stored procedure that has only input params but am unable to call any procedure that also has output params.

Any idea?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:36 (19 by maintainers)

github_iconTop GitHub Comments

1reaction
bimalkjhacommented, Jan 17, 2017

@ljerka We have released the code changes for windows too. Please install ibm_db@1.0.2 and verify it. Thanks.

1reaction
bimalkjhacommented, Nov 25, 2016

@ljerka Thank you for the explanation. We are looking into this and will come back with solution. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Known Issue: DT159043 - IBM
[IBM][CLI Driver] CLI0123E SQL data type out of range. SQLSTATE=HY004 SQL2977I Because of the previous error, the ingest utility will
Read more >
SQL data type out of range. SQLSTATE=HY004 - DSXchange
im doing a unduplicate match job , when i link the output of unduplicate match to db2 connector , then i got this...
Read more >
Error Sqlstate HY004 Using DG4ODBC to Connect to Non ...
[IBM][CLI Driver] CLI0123E SQL data type out of range. SQLSTATE=HY004 {HY004,NativeErr = -99999} ORA-02063: preceding 2 lines from DB2_LINK.
Read more >
CLI0123E: SQL data type out of range. SQLSTATE=HY004
I am having a problem with calling stored procedure that has output parameters. This is the error: Data is missing from [object Object] ......
Read more >
Execution group abends while calling DB2 Stored Procedure
SQLState = HY004 Native = 0x7f578f6a9c9c -> -99999. Message Text = [[IBM][CLI Driver] CLI0123E SQL data type out of range. SQLSTATE=HY004]
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found