|
-
Mar 6th, 2010, 09:23 AM
#1
Thread Starter
Hyperactive Member
Read SQL / Update record
Kind of new to SQL.
I have a process that is a detail/Master issue. I read (into a dataset) my detail record based on several keys. Then I have to read each master record..check some fields/update some fields and then update that master. Detail is not changed.
First.. How do I not lock the detail table during my select?
Second.. after I read my master.. do I need to close that connection BEFORE I attempt to update that record. Currently I set my sql command to get the record.. close the connection .. set my next sql command to UPDATE that record -- re-open connection and then do the executenonquery.
Seems like an awful waste of time but it works.
Is there a better way. We only get better if we ask questions from those who have done it before.
Thanks
gollnick
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
|