[2.0] for loop and SQLExecute
I am trying to randomly generate 30 pieces of data. All works well, except for one thing
I have a for loop, which runs 30 times.
foreach loop, it creates the SQL parameters, adds them to SQLCommand and executenonquery().
it only goes round the loop 3 times, or it seems to only insert 3 records and thats it.
however if i step in the debugger, it seems to generate/insert data 30 times - as wanted.
if i insert a Thread.Sleep (50) it inserts 30 records fine, but i should not have to do this surely?
any ideas? Why does it do it properly when I am debugging (putting a breakpoint) but not when I am making it run on its own?
Re: [2.0] for loop and SQLExecute
I think I found the problem, to be in the Stored Procedure, will get back if i still have the issue