开始一个事务然后update表中的一条记录.在访问这条记录的时候错误.
begin 事务update table set field1="aaa" where id=condition 
select * from table where id="condition"  (无法读取数据.记录为空.)end 事物不知道有没有方法读取数据呢?(注:事务最好在select后面结束.如果一定没有办
法.那在考虑别的方法.

解决方案 »

  1.   

    '开始事务
    conn.begintrans
    '修改数据
    update table set field1="aaa" where id='condition' 
    '提交事务
    conn.committrans
    '提取数据
    select * from table where id="condition" 
      

  2.   

    看这个样子是你这个语句没有更新的记录啊:
    update table set field1="aaa" where id=condition 如果是在一个事务里面修改的记录会直接反映到查询中的所以唯一的解释就是这句话没有记录
    update table set field1="aaa" where id=condition也就是说你数据库里面本来就没有 id = condition 的记录
      

  3.   

    另外你是不是写的有点错id = condition id = "condition"??