Kam,
I would hope, whether you use ADO or ODBC when you send a query:
SELECT * FROM patient WHERE patientid = 'ABC123'
that if there is an index it will be used. Although, I guess it is possible that the ODBC driver doesn't support the index. If you know that for sure, then yes, I would say use ADO.
Make sure it is the SELECT that has a WHERE clause to return the one record you need. You don't want to get ALL the records, then search through the resulting cursor.
BOb
>Hi all,
>
>I need to search a patient record that sits in a large Access MDB (SQL
>server later version) from a VFP program. I can setup remote view to access
>the table. But I don't think I can take advantage of index already created
>in Access. And I don't think creating a temp index on the patient_id
>in VFP in order to seek the record is a good idea (using Locate is out of
>the question). So, I am thinking about changing the code using ADO sending
>Select query to retrieve the recordset,which I suppose the index of the MDB
>will be used by the OLEDB provider, am I right or wrong? Using remote view
>on large table is not such a good idea in this case, right?
>Also I need to update the record too. I am using VFP6 accessing Access 2000
>MDB.
>
>Any suggestion?
>
>Thanks.
>
>Kam.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only