| Sub ADOSeekRecord() Dim cnn As New ADODB.Connection Dim rst As New ADODB.Recordset ' Open the connection cnn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=.\NorthWind.mdb;" ' Open the recordset rst.Open "Order Details", cnn, adOpenKeyset, adLockReadOnly, adCmdTableDirect ' Select the index used to order the data in the recordset rst.Index = "PrimaryKey" ' Find the order where OrderId = 10255 and ProductId = 16 rst.Seek Array(10255, 16), adSeekFirstEQ ' If a match is found print the quantity of the order If Not rst.EOF Then Debug.Print rst.Fields("Quantity").Value End If ' Close the recordset rst.Close End Sub |
Seek Record |
India web developer web development India | Freelance web development ecommerce web developer | Prayagasoft - web designer India, Ecommerce developer india, Ecommerce design