Closed mlitters closed 1 year ago
https://github.com/markdirish/node-odbc/issues/326#issuecomment-1528866208
Here I already posted the Logfile - I thought my problem could be the same as the one with the many parameters. Maybe their problem is not the many parameters but the buffer?!?
Ups - right now we use this on a IBM i 7.3 with Node.js 14 and 18.
Hi @mlitters,
I will see if I can recreate this issue today. Hopefully it is the same issue as #326, and we can get it solved! I will say that I tried with 75 parameters, but all of them were fairly small, so maybe you are in that it is the buffer size of all combined parameters. Like I said, I will take a peek!
@mlitters could you give it a shot with the latest package version (2.4.8)? With 2.4.7 and below I am seeing:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
IOT/Abort trap (core dumped)
But with the latest version, I am seeing the correct results. I believe @kadler 's PR here may have helped: https://github.com/markdirish/node-odbc/pull/318
@markdirish Hi, many thanks for the update. This works. Indeed I had another issue with the wrong number of Parameters. That was fixed by renaming the specific name to the same as the procedure. Many thanks to you and @kadler
Great!
Hi there, i have an issues with calling an IBM i Stored Procedure which we used with the old Node.js DB Providers back in Node 6 and with idb-pconnector.
After testing many, many things I found out it it is the length of the output parameter.
What I do is:
This works fine when I call it this way: const result = await connection.callProcedure('MYDSN', 'MYLIB','SPTEST8', ['12345', null]);
When I enhance the OUT Parameter to (for example) 16000 it doesn't work anymore. In my original procedure I return 32000 as varchar. This is a "legacy" thing which is caused by the problem that the first DB driver for Node.js (back in 2014) didn't return a result set. So I solved it this way. Can you enhance that value easily? Otherwise I need to change a lot of stuff or find another way.
Many thanks and have a great weekend! Markus
Originally posted by @mlitters in https://github.com/markdirish/node-odbc/issues/326#issuecomment-1528865533