I\'m looking for some advise on C# - Please bare in mind that i\'m only a beginner with C# & Sql.
I am looking to design a small program that will Add/Edit/Dele
Of course, you dont need to have multiple SqlConnection instances. for most application, one connection is sufficient. sqlCommand on the other hand is another thing: You might step into trouble if reusing it, but this is more a design issue than a technical thing.
I would suggest you move all your database access code to another class ("DataProvider"/"DatabaseController" or whatever name you think is sufficient) to properly encapsulate the code parts. There is no need for a form to directly handle SqlConnection or sqlCommand objects, let it indirectly happen via public methods of that controller type:
public class DataController
{
private SQLConnection Connection {get; set;
public void DataTable LoadDataFromDatabase()
{
...
}
...
}