Private Sub Command1_Click()
     Dim cnn0 As ADODB.Connection
    ' 本地的ACCESS数据库(数据源)
     Dim cnn1 As ADODB.Connection
     ' 远程的SQL Server2000数据库(目标库)
     
     Dim rst0 As ADODB.Recordset
     Dim rst1 As ADODB.Recordset
     
     Dim strCnn As String
     
     ' 打开数据源连接。
     Set cnn0 = New ADODB.Connection
     strCnn = "employee" ' 已建立DSN为"数据源"的ODBC
     cnn0.Open strCnn
     
     
     ' 打开目标库连接。
     Set cnn1 = New ADODB.Connection
     strCnn = "Provider=sqloledb;Data Source=TZL;Initial Catalog=pubs;User Id=sa;Password=sa;"
     cnn1.Open strCnn
     
     ' 打开数据源表。
     Set rst0 = New ADODB.Recordset
     rst0.CursorType = adOpenKeyset
     rst0.LockType = adLockOptimistic
     rst0.Open "employee", cnn0, , , adCmdTable
     
     ' 打开目标表。
     Set rst1 = New ADODB.Recordset
     rst1.CursorType = adOpenKeyset
     rst1.LockType = adLockOptimistic
     rst1.Open "employee", cnn1, , , adCmdTable
     
     rst0.MoveFirst
     Do Until rst0.EOF
     rst1.AddNew
     rst1.emp_id = rst0.emp_id
     rst1.fname = rst0.fname
     rst1.lname = rst0.lname
     rst1.Update
     rst0.MoveNext
     Loop
     
     rst1.Close
     cnn1.Close
     
     rst0.Close
     cnn0.Close
     
    End Sub
错误何在????????????????????????????????