You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to insert 100 records in the database. But unfortunately, I get my request object updated with the last value in the loop. Is there any way by which I can send my every request with the current value given by the loop?
This is my code I'm using to acquire connection pool and request:-
Now notice that the function is called in a loop and the parameter "values" keeps changing. But the problem arises when "connection.callProcedure(request)" intakes the last updated value from the loop and keeps inserting the same last value till the loop count.
The text was updated successfully, but these errors were encountered:
Are you changing the procValues object during loop iteration? If so, that might explain the issue you are seeing. 🤔 the code snippet you posted can not really be used to debug or reproduce your issue. Would you mind providing an example that can be executed?
I'm trying to insert 100 records in the database. But unfortunately, I get my request object updated with the last value in the loop. Is there any way by which I can send my every request with the current value given by the loop?
This is my code I'm using to acquire connection pool and request:-
Now notice that the function is called in a loop and the parameter "values" keeps changing. But the problem arises when "connection.callProcedure(request)" intakes the last updated value from the loop and keeps inserting the same last value till the loop count.
The text was updated successfully, but these errors were encountered: