最近delphi6.0+SQLSERVER 2000 做一个系统时,遇到了一个我以前在DEPHI5.0用同样的方法不出错的问题具体如下:
   我想给纪录进行编号:例如
   1   JKX
   2   JDX
   3   JGX
   4   YYX
当我将某一纪录删除后:例如 删除 JDX 后整体记录如下:
   1   JKX
   2   JGX
   3   YYX
我在DELPHI 6.0 中的代码如下:
   with table1 do
        begin
          open;
          first;
          i:=1;
          while not eof do
            begin
               edit;
               fieldbyname('serial_num').asinteger:=i;
               inc(i);
               next;
            end;
         if (dsedit= state) or (dsinsert= state) then
           post;
         end;
但老是提示出错:OBDB 出错信息如下:
     ---------------------------
   Debugger Exception Notification
---------------------------
Project p_table_try.exe raised exception class EDBEngineError with    message 'Capability not supported.
General SQL error.
[Microsoft][ODBC SQL Server Driver]没有执行可选特性'. Process stopped. Use Step or Run to continue.
---------------------------
OK   Help   
---------------------------