Hi Josef
Your code for checking the particular cell value is empty and save with 0 is correct
but you will have to do some little change in your code while running the Sql Command..
if you see the code, you are keep on
adding the command parameters inside the loop since the command object is declared outside the loop. it should be avoided.
Try adding the entire code inside the for each loop.
For every transaction the data base connection should be
opened
and
closed
, else it wont work as expected in case of large loop.
Try removing
prepare()
and check it.
Please read
this[
^] before using Prepare().