duanouyong4228 2012-04-25 12:57
浏览 67
已采纳

FoxPro保留字问题?

I am attempting to read a foxpro table called SCHEDULE.dbf. The data is read in PHP via data connector then piped to my webpage. This all works wonderfully, provided I rename Schedule.dbf. Any name except Schedule seems to work. When I run it named Schedule, however, I get "SQL error: [Microsoft][ODBC dBase Driver] Index file not found., SQL state S0012 in SQLExecDirect" error message. My only idea is that Schedule is a reserved word someplace, but I can't find it on any list. I am at an utter loss. Renaming the table is not really an option as it is part of a larger data entry and management system that I would rather not modify. Any suggestions?

  • 写回答

2条回答 默认 最新

  • dongrong7267 2012-04-25 15:22
    关注

    I can't say for dBASE (and I would use Microsoft's OleDb provider specifically for VFP if it IS Foxpro data and not dBASE). In Foxpro, the system works with paired (or even triple) files. All corresponding file names need to be renamed, such as

    SCHEDULE.DBF (main data)
    SCHEDULE.CDX (compound index file for all indexes for given file)
    SCHEDULE.FPT (separate file if any memo/general data columns in the file)
    

    If you try to just rename the .DBF but not the rest (.FPT is only found IF a data column is of type memo or general), then it will choke opening the file.

    Additionally. If the table is part of a database container (via VFP), and you try to open it, the file has additional header information to point to the database it is bound to. If it can't find it in the database, that too could give you a misdirected error.

    Database Containers in VFP have suffix values of .DBC, .DCT and .DCX.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来