Best Way to add a row to a table

MTSkull

Well-known member
Joined
Mar 25, 2003
Messages
135
Location
Boulder, Colorado
What is the best way to add a row to a table. My biggest concern is possible colisions and how to handle them as well as performance.

I am connecting to an exsisting SQL server Database in New Jersey ( the program will be used in Colorado). I have thus far set everything up with stored procedures and was Amazed that I could see no appreciable difference when running against the remote server compared to my harddrive.

I have come up with two ways to add a record and was wondering which I should go with?

1. Create an sqlAdapter, build an Insert command, submit the change direct to the table in jersey.

2. Add the change to the Dataset then submit the change through an SQL adapters Insert, update, accept changes commands.

I am not worried about the dataset being syched with the master DB. The dataset will be snapshot of the pertinant records from the master DB. There will be up to 5 people using the Database at any one time. At this time I will not be modifying exsisting records only adding new rows.

Thanks
Brian
 
Scenario 1 is good but...
I would keep the updates in a Stored Proc and use the sqlCommand and sqlParameter as needed.

Scenario 2. What happens if the user decides to add tons of new records before saving/submitting them, it could get hairy if all the users do this.
 
Back
Top