/*
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim rs2 As ADODB.Recordset
Private Sub Command1_Click()
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
Set rs2 = New ADODB.Recordset
' Open a single Connection object to SQL Server
With cn
.Provider = "SQLOLEDB"
.ConnectionString = "Data Source=sql_server_name;User ID=sa;Password=;"
'The first connection to SQL Server is opened
.Open
.DefaultDatabase = "Pubs"
End With