Around 25 fields go to the same table...and the rest would be going to other various tables.....I cant pass 25 values as parameters...would not be good I guess!
Of course you can. That said, it may be prefereable to define a class that has a property for each of the values you want to pass. You then create an instance of this type and pass it to the method, which would then have a single argument.
You need to look into typed DataSets if you aren't already using them. Adding a DataSet to a project doesn't just create a generic DataSet object. It creates a strongly typed DataSet which you can add tables, primary keys, and relations. This will save you a TREMENDOUS amount of time.
Just to get a feel for what you need to do, after you add a typed DataSet to your project, then add a new item and choose "Data Form Wizard". In the first step, choose the DataSet you created. Next, check to include an update button. Choose the default on the next two options. Then on "Choose the display type" pick "Single record in individual controls" and you can also choose which buttons appear on the form.
This sets up all of your data binding automatically for you. The only thing you have to implement is your Load() and Update() methods.
I've included an example that loads an XML file with set of customers from the Northwind Database.
I've also included a simpler sample that connects to a sql server database.
The key to updating a table easily is to use the SqlCommandBuilder (or OleDbCommandBuilder.) This automatically generates Insert, Update, and Delete statements for your DataAdapter so you don't have to create or fill any parameters.
CSharp Code:
this.sqlConnection = new SqlConnection(this.strConnection);
this.sqlCommand = new SqlCommand("SELECT * FROM Notes", this.sqlConnection);
this.sqlAdapter = new SqlDataAdapter(this.sqlCommand);
// automatically generate the delete, insert, and update commands
// based on the select command
SqlCommandBuilder commandBuilder = new SqlCommandBuilder(this.sqlAdapter);
// verify the delete, insert, update statements were generated