R
Rob T
I have a collection of objects that I'm using to keep track of general
ledger (GL) entires. Each object in the collection is one GL entry. I then
have a function that will add up all the debits and credits (positives and
negatives) entries to make sure they all balance.
To do this, I create a temporary table in SQL server, then insert the values
of each object into the table, and then do a summary of the debit and credit
columns. If the debit & credit columns match, the transaction is valid.
So, this routine works perfectly EXCEPT for when I'm trying to debug it in
VS. When I step through the code, when the code performs the Insert into
table, it inserts the value 4 to 6 times....even though the code only
executes one time. The code is simple: I open the connection, perform the
insert, and close the connection.
Why when I'm stepping through, does it do this?
Additional Notes:
- It doesn't matter if I'm inserting into a temp or a regular table.
- I have an identiy field in the table, so you can actually see it increase
for each record that was entered...even though the code only stepping
through once!
Thanks
-Rob T.
ledger (GL) entires. Each object in the collection is one GL entry. I then
have a function that will add up all the debits and credits (positives and
negatives) entries to make sure they all balance.
To do this, I create a temporary table in SQL server, then insert the values
of each object into the table, and then do a summary of the debit and credit
columns. If the debit & credit columns match, the transaction is valid.
So, this routine works perfectly EXCEPT for when I'm trying to debug it in
VS. When I step through the code, when the code performs the Insert into
table, it inserts the value 4 to 6 times....even though the code only
executes one time. The code is simple: I open the connection, perform the
insert, and close the connection.
Why when I'm stepping through, does it do this?
Additional Notes:
- It doesn't matter if I'm inserting into a temp or a regular table.
- I have an identiy field in the table, so you can actually see it increase
for each record that was entered...even though the code only stepping
through once!
Thanks
-Rob T.