vfpoledb - got "Error building key for index...." when inserting into .dbf
With vfpoledb, I got the error 开发者_JAVA百科message:
error building key for index "...event.cdx" on tag Main
when inserting a new row in event.dbf like below code:
cmd.CommandText = "Insert Into Event ...."
cmd.ExecuteNonQuery()
at line of ExecuteNonQuery() method of my oledbcommand object
If I remove the .cdx file from the data file folder, the code works fine and data inserted. I'm new to vfp things. It looks like the Insert action failed to update the index file, is anything missing in my code?
Try inserting a record using VFP itself. This will tell you if you have a problem with the OLEDB interface or a more general issue with the table.
精彩评论