在SQL中 UPDATE table1
       SET col1=0
       WHERE col1 is null
请问在VB中如何运用ADO控件实现上面的功能?

解决方案 »

  1.   

    UPDATE table1 
          SET col1=0 
          WHERE col1 is null 在Adodc 控件中 写入这样的SQL语句行不?
      

  2.   


    adodc1.recordsource="update table1 set col1=0 where col1 is null"
    adodc1.refresh
    这样写吗?
      

  3.   

    adodc1.recordsource是返回记录集吧?
    没用过adodc
    直接用ADO对象,用连接的execute方法执行...
      

  4.   

    dim conn as new adodb.connection
    conn.open ...    '与数据库建立连接
    conn.execute "update table1 set col1=0 where col1 is null"