从书上看到数据集的Insert和Append是不同的。前者将新记录插入在当前记录之后,后者将新记录追加在表的末尾,可我做了实验结果却不是这样。两者的执行效果是完全相同的,都是追加在表的末尾。这是为什么呢?谢谢!

解决方案 »

  1.   

    因为你有设置排序,或可能你有设置一个字段为自动增长的,而且是主键,所以默认以这人字段为索引,排序的,Insert和Append增加的字希ID都是最大的,所以就排在最后,所以是一样的。
      

  2.   

    look at this:
             For Paradox tables with primary indexes, the record is inserted into the dataset in a position based on its index.
    For Paradox tables without primary indexes, the record is inserted into the dataset at the current position.
    For dBASE, FoxPro, and Access tables, the record is physically appended to the dataset at the end. If an index happens to be active, the new record may appear in a position relative to the index, but the record is still actually stored at the end of the table.         For SQL databases, the physical location of the insert is implementation-specific. For indexed tables, the index is updated with the new record 
    information.copy from delphi help.
      

  3.   

    当前你插入的记录放置在哪儿有什么意义么?同意‘lijinghe1’的,物理上的排列对于大部分关系数据库来说是没有什么意义的
      

  4.   

    对于SQL型数据库来说,只有逻辑顺序,物质顺序是不重要的
      

  5.   

    借这个主题,我想问一下,如何具体设置,才能让新记录"插在哪儿就在哪儿",而不是将新记录全都排在最后一行,只起来Append一种效果。我也被这问题困扰,我想实现“在哪儿插入就定位在哪儿”这种效果,怎么做呢?
      

  6.   

    因为你有设置排序,或可能你有设置一个字段为自动增长的,而且是主键,所以默认以这人字段为索引,排序的,Insert和Append增加的字希ID都是最大的,所以就排在最后,所以是一样的。
      经典!!!!!!!!!!!!!!!!!!!!!!!
    在乎顺序干什么???不明白,