R
Robert Schuldenfrei
Hi NG,
I am looking for an opinion here. I am new to C# and SQL, being an old
COBOL hand. I have started into a conversion of an old COBOL ERP system. I
have a number of functions working now and it is time to decide how best to
deal with the issues of concurrency. The old COBOL programs used record
locking to prevent concurrency errors and that logic is already "on the
shelf." Most C# books and articles I have seen use the default optimistic
concurrency as a way around these issues. I have coded a few test examples
and they work fine, except that you may have to tell a user to "try again."
I want to pause at this point before I code about 100 tables to get the
opinion of experienced experts on the best way to move forward. I have
noticed in books on SQL that you can do record locking down to (in some
cases) row level. This would seem like the way I wish to go. Further, I
have stayed away from SQL "Transactions" to this point, because there is a
lot I need to learn about SQL. Now may be the time to learn how to use
them. For ease of conversion I have tended to use SQL like the COBOL
programs use files. The less that SQL does, the more this project looks
like a language translation job. However, I really do want to use C# best
practices least I have an unsupportable "kludge" on my hands when I am done.
Thanks for your advice,
Bob
Robert Schuldenfrei
(e-mail address removed)
I am looking for an opinion here. I am new to C# and SQL, being an old
COBOL hand. I have started into a conversion of an old COBOL ERP system. I
have a number of functions working now and it is time to decide how best to
deal with the issues of concurrency. The old COBOL programs used record
locking to prevent concurrency errors and that logic is already "on the
shelf." Most C# books and articles I have seen use the default optimistic
concurrency as a way around these issues. I have coded a few test examples
and they work fine, except that you may have to tell a user to "try again."
I want to pause at this point before I code about 100 tables to get the
opinion of experienced experts on the best way to move forward. I have
noticed in books on SQL that you can do record locking down to (in some
cases) row level. This would seem like the way I wish to go. Further, I
have stayed away from SQL "Transactions" to this point, because there is a
lot I need to learn about SQL. Now may be the time to learn how to use
them. For ease of conversion I have tended to use SQL like the COBOL
programs use files. The less that SQL does, the more this project looks
like a language translation job. However, I really do want to use C# best
practices least I have an unsupportable "kludge" on my hands when I am done.
Thanks for your advice,
Bob
Robert Schuldenfrei
(e-mail address removed)