I have a code snippet similar to the one below that I would like to refactor into two different functions each with their own connection (for better maintenance):
Dim Conn, Sql, RS
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open ConnString
Sql = SELECT * FROM CLIENTS
Set RS = Conn.Execute(sql)
//'Do something with Clients
Set RS = Nothing
Sql = SELECT * FROM DEALERS
Set RS = Conn.Execute(sql)
//'Do something with Dealers
Set RS = Nothing
Conn.Close
Set Conn = Nothing
Will having two functions (e.g. GetClients and GetDealers) each opening and closing their own connections have a major performance hit, opposite only opening and closing a single connection as illustrated above? If so, how would you refactor the code?