do u mean smth like this?
in the initcomp (but this could be all done automatic if you are using VS.NET)
Private sub initializecomponent()
me.sqlConnection = new system.data.sqlclient.SqlConnection
me.sqlDataAdapter = new system.data.sqlclient.SqlDataAdapter
me.sqlCommand = new system.data.sqlclient.SqlCommand
SqlConnection.connectionString = " your connection string "
Me.SqlDataAdapter.InsertCommand = Me.SqLInsertCommand
Me.SqlDataAdapter.SelectCommand = me.SqlSelectCommand
me.SqlSelectCommand.CommandText = "[name of stored procedure]"
me.SqlSelectCommand.CommandType = System.DAta.CommandType.Storedprocedure
sqlDataAdapter.SelectCommand.Connection = SqlConnection
"Take a look after the property TableMappings.addRange
me.SqlSelectCommand.Tablemappings.addRange = "..................." => specific in your case... look after it on msdn.microsoft.com
...
end sub
=> as said, all this before could be done automaticly in Visual Studio.Net (by draging a dataadapter on the design field...)
later when u wanna use de connection...
SqlDataAdapter.Fill(myDataSet) ' dataset has been filled automaticly ==> it take automaticly your select-command
==> when u wanna up smth => sqlDataAdapter.update(myDataSet) => automaticly takes insert, delete and update...
dataGrid.DataSource = myDataSet
dataGrid.DataMember = myDataSet
DataGrid.DataBind()