RE: How do I add an index to a FoxPro table

From: Colin McLelland (colinj_mc_at_hotmail.com)
Date: 03/29/04


Date: Mon, 29 Mar 2004 15:21:08 -0800

Hi Dave,

if it is just for the duration of the program execution I have found the following works for dbf files...

Dim f_rsIdx As ADODB.Field

rs.CursorLocation = adUseClient ' without double checking I think this is vital

'
' Open database here
'

'Create the recordset
rs.Open ......

'Index on field called Author
Set f_rsIdx = rs.Fields("Author")
f_rsIdx.Properties("Optimize") = True

Hope this does the trick for you.

Colin



Relevant Pages

  • Re: how to do exclusive open of DBF file with Visual foxpro odbc driver
    ... buried in the oledb documentation on the MSDN website. ... > and without the .dbf at the end. ... > Dim dtTable As New DataTable ... have you considered MSDE/SQL Server ...
    (microsoft.public.vb.database.ado)
  • Re: how to do exclusive open of DBF file with Visual foxpro odbc driver
    ... As for now I'm still stumped as to how to do the ALTER ... without the .dbf at the end. ... Dim dtTable As New DataTable ... Then you'd only need to deal with two providers. ...
    (microsoft.public.vb.database.ado)
  • RE: Help with importing
    ... Dim strFullName As String ... Dim dbf As Database ... The make it an Append Query. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Program doesnt when user changed
    ... Dim rs As ADODB.Recordset ... rs.CursorLocation = adUseClient ' Generates an error ... this program runs well from Admin account. ... > It doesn't use registry access commands, such as "Save Setting, Load ...
    (microsoft.public.vb.general.discussion)
  • Recordset Update with *.DBF - HOW?
    ... I have opened a DBF database and i cant update it. ... Dim conn As New ADODB.Connection ... Dim cmd As New ADODB.Command ... conn.CursorLocation = adUseClient ...
    (microsoft.public.vb.database)