请问"修改"的代码怎么写?我用的是adodc控件。这问题太简单了,可我是一名新手,不会。谢谢大家!

解决方案 »

  1.   

    dim g_conn as new adodb.connection
    dim l_rs as new adodb.recordsetg_conn.ConnectionString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=pubs;Data Source=ES103"g_conn.Openl_rs.CursorLocation = adUseClient
    l_rs.Open "select * from jobs", g_conn, adOpenDynamic, adLockOptimistic
    set datagrid1.datasource=l_rs1_rs.open "update table set cola='1222'"
      

  2.   

    g_conn.Execute "update table set cola='1222'"
      

  3.   

    你的问题不是很清楚呀 修改什么呀
     如果是修改记录集
      就不要 rs.addnew
       
      直接用     rs.update 
      

  4.   

    CN..Execute "update 表名 set 列名=XX where 条件"
      

  5.   

    用sql语句
    rs.open "update TableName set Col=Value where "
      

  6.   

    conn.execute "update 表名 set 字段名=值 where 条件"