×

Loading...
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务
Ad by
  • 推荐 OXIO 加拿大高速网络,最低月费仅$40. 使用推荐码 RCR37MB 可获得一个月的免费服务

index and delete

INDEX ON eExpression TO IDXFileName | TAG TagName
[ COLLATE cCollateSequence ] [OF CDXFileName] [FOR lExpression]
[COMPACT] [ASCENDING | DESCENDING] [UNIQUE | CANDIDATE] [ADDITIVE]

examples:

* Example 1
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE Customer && Open customer table
INDEX ON company TO complist
CLEAR
DISPLAY STATUS

* Example 2
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE Customer && Open customer table
INDEX ON SUBSTR(city,1,5) + SUBSTR(company,1,6) TO citycomp
CLEAR
DISPLAY STATUS

* Example 3
CLOSE DATABASES
OPEN DATABASE (HOME(2) + 'Data\testdata')
USE Customer && Open customer table
INDEX ON address TAG address
INDEX ON company TAG company OF custcdx
CLEAR
DISPLAY STATUS




Delete Record:

DELETE FROM [DatabaseName!]TableName
[WHERE FilterCondition1 [AND | OR FilterCondition2 ...]] --- Standard SQL statement
Report

Replies, comments and Discussions:

  • 工作学习 / IT技术讨论 / 紧急求救!运行Foxpro时死机了,重新运行时有些数据库打不开了,怎么办?
    • 第一是把文件都备份. 第二步,可以用其它软件打开数据库文件试一下.我没有用过FOXPRO,如果是旧的FOXPRO文件,其实就是一个简单文件而已,很多软件都可以读它,例如ACCESS,甚至有C的库可以读.
    • rebuild index
      • 您讲到点子上了,但是我不知道如何重新建立索引.能不能详细一点?
        • 虽然没有用过FOXPRO,还是记得索引文件是可以根据数据文件建立的.就是一条命令,新的FOXPRO应该是菜单上就有吧.
        • Sorry, I only know the index will be corrupt when the db is un-normal shutdown. I don't the syntax. Do u have online help with the software?
    • 高手们,我更正点错误: 原来是Foxpro,后来再VFP下重新编译运行了。这样的情况如何重建索引?另外,能不能将数据库置零,这样重新输入数据?希望哪位高手留下电话,详细求教。谢谢!
      • 不好意思。
        VFP跟foxpro的索引很不同,多年不用,不太记得了,你找些资料看看吧,数据库置0是什么意思?当然可以把那些table的记录清掉,记得foxpro有个命令的。
      • index and delete
        INDEX ON eExpression TO IDXFileName | TAG TagName
        [ COLLATE cCollateSequence ] [OF CDXFileName] [FOR lExpression]
        [COMPACT] [ASCENDING | DESCENDING] [UNIQUE | CANDIDATE] [ADDITIVE]

        examples:

        * Example 1
        CLOSE DATABASES
        OPEN DATABASE (HOME(2) + 'Data\testdata')
        USE Customer && Open customer table
        INDEX ON company TO complist
        CLEAR
        DISPLAY STATUS

        * Example 2
        CLOSE DATABASES
        OPEN DATABASE (HOME(2) + 'Data\testdata')
        USE Customer && Open customer table
        INDEX ON SUBSTR(city,1,5) + SUBSTR(company,1,6) TO citycomp
        CLEAR
        DISPLAY STATUS

        * Example 3
        CLOSE DATABASES
        OPEN DATABASE (HOME(2) + 'Data\testdata')
        USE Customer && Open customer table
        INDEX ON address TAG address
        INDEX ON company TAG company OF custcdx
        CLEAR
        DISPLAY STATUS




        Delete Record:

        DELETE FROM [DatabaseName!]TableName
        [WHERE FilterCondition1 [AND | OR FilterCondition2 ...]] --- Standard SQL statement