1。Locate('sno',VarArrayof([SpinEdit1.text]),[LopartialKey])这是什么玩意,看不懂。2。Edit;
   Post;
   Append;
这三个是什么?

解决方案 »

  1.   

    1,按字段[sno]查询值为SpinEdit1.text的记录,如果想按照多个字段查询,可以
    Locate('sno;sno2;sno3',VarArrayof([SpinEdit1.text,值2,值3]),[LopartialKey])2,Edit---修改当前记录.比如
       ADOTable.Edit;
       ADOTable.FieldByName('Name').AsString := 'LiYong';
       ADOTable.Post;3,Append和Insert都是向数据库添加记录,其中Append是在记录尾添加一记录
    Insert是从首记录插入一条记录注意:  Edit,Append,Insert后须跟 Post;
      

  2.   

    按字段[sno]查询值为SpinEdit1.text的记录,如果想按照多个字段查询,可以
    Locate('sno;sno2;sno3',VarArrayof([SpinEdit1.text,值2,值3]),[LopartialKey])
    Edit 使ADOTABLE、TABLE处于编辑状态
    POST 保存
    APPEND 在当前数据表中添加一条空白记录 指针并指向该记录
      

  3.   

    [loCaseInsensitive]
    Key fields and key values are matched without regard to case.
    字段的数据必须与指定的数据一致,不包括大小写例如:
    f.Locate('sno;sno2;sno3',VarArrayof('abc',值2,值3]),[LopartialKey])如果找到的话,f.FieldByName('sno').Value 等于 'abc',或 'ABC', 'Abc',...
    [loPartialKey]
    Key values can include only part of the matching key field value; for example, 'HAM' would match both 'HAMM' and 'HAMMER.'字段的数据与指定的数据主数据一致例如:f.Locate('sno;sno2;sno3',VarArrayof('abc',值2,值3]),[LopartialKey])
    如果找到,f.FieldByName('sno').Value可能是 'abc', 'abcd',.. 但不会是 'a', 'ab',..
      

  4.   

    Insert是在当前记录前插入一条记录;
    你在调用 post 后,应该在调用refresh 进行刷新
    loCaseInsensitive:是不区分大小写
    LopartialKey :是可以进行模糊查询