| Sub ADOOpenRecordset() Dim cnn As New ADODB.Connection Dim rst As New ADODB.Recordset Dim fld As ADODB.Field ' Open the connection cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=.\NorthWind.mdb;" ' Open the forward-only, ' read-only recordset rst.Open _ "SELECT * FROM Customers WHERE Region = 'WA'", cnn, adOpenForwardOnly, adLockReadOnly ' Print the values for the fields in ' the first record in the debug window For Each fld In rst.Fields Debug.Print fld.Value & ";"; Next Debug.Print ' Close the recordset rst.Close End Sub |
Recordset, Open |
India web developer web development India | Freelance web development ecommerce web developer | Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design