当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

 ·如何用u盘作启动盘    »显示摘要«
    摘要: 我把u盘格式化为启动盘,但是在bios里面却没有从u盘启动的选项啊? 是不是主板不支持呢? ......
 ·关于datacombo的运用    »显示摘要«
    摘要: 各位大哥: 如何在程序上定义datacombo的rowsource 和rowmenber, ......


ADO事务处理

我正在设计的数据库要求将表A中的数据插入到B表中,然后删除A表中数据  
  我想用事务。  
  请提供方法

NO.1   作者: lincanwen

AdoConnection.BeginTrans;  
        Try  
              插入操作..  
              删除操作..  
              AdoConnection.CommitTrans;  
        Except  
              AdoConnection.RollBackTrans;  
        End;

NO.2   作者: My_first

try  
  adoconnection.beginstran;  
  do...  
  adoquery1.append;  
  aodquery1.fieldbyname(field).asstring:=edit1.text;  
  ....  
  adoquery1.post;  
  adoconnection.commition;  
  except  
  adoconnection.rollback;  
  showmessage(删除错误or   插入错误);  
  end;


    摘要: 象这样的代码是必须的吗? sqlconnection cnn = new sqlconnection; cnn.connectionstring="data source =mydatabase ;initial catalog= mydb;user id =vs_role;password=0000"; cnn.open(); 其中的password 必须填吗? 这样......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE