Creating DBASE-Indices with DAO and VB 5

Creating DBASE-Indices with DAO and VB 5

Post by Fortune System » Mon, 27 Jul 1998 04:00:00

With DBASE index expressions can be something like
"UPPER(SUBSTR(NAME,1,20))". How can  you specify such an index structure
using DAO and VB 5? Can it be done at all??

Best regards


1. Creating dBASE III indexes using DAO 3.60...

How do I create an .ndx dBASE III file using DAO 3.60.  I create the .inf
file BEFORE yet DAO will not let me append the index to my workspace.  Here
is my code:

-------in modMain.bas module-------------
Option Explicit

Global wsCS As Workspace
Global dbCS As Database
Global tdCS As TableDef
Global idxCS As Index

-----------------in frmExe.frm module
Private Sub cmdIndexTBL_Click()

    Set wsCS = CreateWorkspace("wsCS", "Admin", "")
    Set dbCS = wsCS.OpenDatabase("B:\CS-6.07\M1JAX\DATA" & "\", False,
False, "dBASE III")
    Set tdCS = dbCS.TableDefs("CSTBL")
    Set idxCS = tdCS.CreateIndex("CSTBL")

    subIndexINF txtDBF_Name.Text 'This call creates the .INF file for DAO
    idxCS.Fields.Append tdCS.CreateField("CS_INDEX")
    tdCS.Indexes.Append idxCS

End Sub

When it gets to appending the index I get the error below:

Run-Time error 3251

Operation is not supported for this type of object.

How do I create this index for a dBASE III database when I always get the
error message above.  Any help anyone could give me would be a huge
assistance.  Thank you in advance.

2. Cluster resource 'SQL Server Fulltext' failed - (On only one node)

3. Create DBF (dBase IV) using VB and DAO

4. The escape key

5. Activating a dBase 5.5 Index in DAO 3.5

6. Connecting to MySQL via JDBC Drivers

7. Creating dBase tables using ADO or DAO ??

8. DBGrid - setting focus

9. Creating dBase-tables using DAO

10. Using dbase MDX Files in VB Apps w/DAO

11. Creating NONMAINTAINED index (*.ndx) FOR DBASE

12. Creating dBase indexes

13. Accessing & Creating dBase-Files with CDX-Indexes