ConnectToSQLServer() <-- ideally keep open so I don't have to establish in every record Read ASCII data line by line Build SQL Insert statement Query lookup table for one of the fields (same DB) Add the new info to the SQL Insert statement (I'm using StrBuilder.Append for every field) Execute the Insert statement (same DB - ideally same already opened connection) do it again for next lineI wrote a prototype reading the SqlConnection and SqlCommand samples from help and books and it works fine. But that is creating and closing a connection around every SQL statement. Now I want to put all the parts together and guess that it would be inefficient to be destroying the connection every time.
public void ConnectToSqlServer()
that establishes the connection, but it goes out of scope.