|
-
Apr 8th, 2006, 04:15 PM
#1
Thread Starter
PowerPoster
[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?
Last edited by Techno; Apr 8th, 2006 at 04:21 PM.
-
Apr 8th, 2006, 04:31 PM
#2
Thread Starter
PowerPoster
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|