Hi ,
i have a foxpro table INVENT.dbf. An index is created in this table on the field item_no. This generated a INVENT.IDX file also.
In vb.net application, i am searching for item based on item_no. So i want to use the indexed INVENT.dbf file.
i have a foxpro table INVENT.dbf. An index is created in this table on the field item_no. This generated a INVENT.IDX file also.
In vb.net application, i am searching for item based on item_no. So i want to use the indexed INVENT.dbf file.
- How can i create an index on a field from vb.net?. I tried the following, but didnt work
Code:
[size=2][color=#0000ff][size=2][color=#0000ff]Dim[/color][/size][/color][/size][size=2] conn [/size][size=2][color=#0000ff][size=2][color=#0000ff]As[/color][/size][/color][/size][size=2][color=#0000ff][size=2][color=#0000ff]New[/color][/size][/color][/size][size=2] System.Data.OleDb.OleDbConnection([/size][size=2][color=#800000][size=2][color=#800000]"Provider=VFPOLEDB;Data Source=D:\AIT;Persist Security Info=False"[/color][/size][/color][/size][size=2]) [/size]
[size=2][color=#008000][size=2][color=#008000]Dim Query2 As String = "Create INDEX Idx1 ON INVENT (ITEM_NO)"
[/color][/size][/color][/size][size=2][size=2][/size][size=2][color=#0000ff][size=2][color=#0000ff]Dim[/color][/size][/color][/size][size=2] Cmd2 = [/size][size=2][color=#0000ff][size=2][color=#0000ff]New[/color][/size][/color][/size][size=2] OleDbCommand(Query2, conn)
conn.Open()
[/size][size=2]Cmd2.ExecuteNonQuery()
conn.Close()
[/size][/size]
- Is there a way to use the foxpro indexed table ?