当窗体运行时,将数据库中 表A  的 num列 复制到同一个库据库 表B 的 num列 中,
有没有这个功能,如果有,请问怎样能够实现呢?......
俺是超级菜鸟.....希望各位大家多多指教....

解决方案 »

  1.   

    update b set b.num=a.num
    from a,b
    where a.id=b.id
      

  2.   

    应该把记录集(比如Public rss As ADODB.Recordset)要定义成全局
    然后你试试Leftie的方法,试试吧,我有不懂跟一贴。
      

  3.   

    Leftie(左手,为人民币服务)请在VB里能用SQL的语句????```
      

  4.   

    Leftie(左手,为人民币服务)请问在VB里能使用SQL的语句????```
      

  5.   

    在工程中引用ADO
    private sub form1_load()
    dim conn as adodb.connection
    dim strsql as string
    with conn
        If .state = adStateOpen Then .Close
        .ConnectionString = "driver=SQL Server;server=计算机机名或IP地址;uid=sa;pwd=;database=数据库名"
        .CommandTimeout = 300
        .Open
    end withstrsql="update b set b.num=a.num from a,b where a.id=b.id "
    conn.execute strsqlconn.close
    set conn=nothing
    end sub
      

  6.   

    谢谢````` Leftie(左手,为人民币服务)
      

  7.   


    Leftie(左手,为人民币服务) 的回答很精彩!