Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CREATE INDEX Statement

Status
Not open for further replies.

bjd4jc

Programmer
Joined
Nov 8, 2001
Messages
1,627
Location
US
I am trying to create an index on the value of a paticular field using the CREATE INDEX Statement. The reason I need to do this is because there is a previously written program that uses this index (the index file was originally generated by Foxpro) and it expects the value of the field. Here is what I tried:

Code:
db.Execute "CREATE INDEX SNINV ON SN (Val(F_INVNO))"

AND
Code:
db.Execute "CREATE INDEX SNINV ON Val(SN(F_INVNO))"

Neither of them work. They both give the error: "Syntax error in CREATE INDEX statement."

Does anyone know how to make an index like this in VB? Oh, I am using the DAO 2.5/3.51 compatability library and connecting to a "FoxPro 2.5" database.

thanks

brian
 
The syntax is
CREATE INDEX SNINV ON table(attribute)"

It looks like your throwing in an extra variable
Val(SN(F_INVNO))
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top