ADO lets you create a Recordset without creating an explicit Connection object, using the following syntax:
Dim rs As New ADODB.Recordsetrs.Open "Authors", "DSN=Pubs"
If you later want to create another Recordset, but you (correctly) don’t want to create another database connection, you can reuse the implicit Connection object that ADO has created for the first Recordset, as in:
Dim rs2 As New ADODB.RecordsetSet rs2.ActiveConnection = rs.ActiveConnectionrs2.Open "Publishers"
or, more simply, with
Dim rs2 As New ADODB.Recordsetrs2.Open "Publishers", rs.ActiveConnection
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.























