|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
DataTable for just one record - most efficient?I've searched the forum, but I couldn't find an answer in the existing posts...
I am executing an SQL query which I know will return only one record. I will then insert a record, then delete the record I returned from the DB. Is using the DataTable the most effiecient way to do this? PJSimon I advise you to use transactions in your code! It's the eficient way to do
this! Read the record to the datatable, and then begin the transaction! if the delete goes wrong you could roll back the insert. DanyR. Show quoteHide quote "pjsimon" wrote: > I've searched the forum, but I couldn't find an answer in the existing posts... > > I am executing an SQL query which I know will return only one record. I > will then insert a record, then delete the record I returned from the DB. Is > using the DataTable the most effiecient way to do this? > > PJSimon |
|||||||||||||||||||||||