如题!还有,向数据库添加数据的时候,Edit和append哪个好?

解决方案 »

  1.   

    ADOTable的TableName设置成要连接的表Edit 是修改数据
    append 是增加数据
      

  2.   

    ADOTable的TableName设置成要连接的表
    s:=ADOTable.FieldByName('字段名').asstring;  //取值adotable.edit;  //修改
    ADOTable.FieldByName('字段名').asstring:= 'fd';
    adotable.post;adotable.append;  //增加
    ADOTable.FieldByName('字段名').asstring:= 'fd';
    adotable.post;
      

  3.   

    begin
       datasource1.close;
       adotable1.first;
       while not adotable.eof do
         begin
           if adotable['ziduan']=' 你查询的记录' then break 
           else adotable.next;
         end;
       datasource1.open;
      

  4.   

    两个都差不多append:    Adds a new, empty record to the end of the dataset.Edit:   Call Edit to permit editing of the active record in a dataset. Edit determines the current state of the dataset. If the dataset is empty, Edit calls Insert. Otherwise Edit
      

  5.   

    然后怎么发送sql语句呢?
    SQL用adoquery组件
      

  6.   

    取数据:
    With  adotable1 do  
     begin 
          close;
          tablename :='你的表';
          Active :=true;
          append ;//追加
          ……
          ……
          post ;
          refresh;  
     end;
      

  7.   

    SQL也是
    SQLinsert或append这样添加