以下是代码贴出来,请帮助
Dim cn1 As New ADODB.Connection '连接源数据库
Dim rs1 As New ADODB.Recordset '源数据集
Dim cn2 As New ADODB.Connection '连接目标数据库
Dim rs2 As New ADODB.Recordset '目标记录集
Dim rstemp As ADODB.Recordset '临时记录集
Dim strCNN As String, strSQL As String '定义字符串
Dim record1, record2, record3 '定义两个记录
Private Sub Command1_Click()
'cn2.Open
cn1.Execute "delete * from 表A"
cn2.Close
End Sub
Private Sub Command2_Click() '要求复制新.mde内表A到目标.mde 表A,目前都还没完成!
'cn2.Open
'select * into [e:\复制\新.mdb].表A from 表A
'Set rs1 = cn1.OpenRecordses("Select * FROM 表A")
'n1.Execute "select * into [e:\复制\新.mdb].表A from 表A"
'Insert into [e:\复制\目标.mdb].[表A] Select * From 表A in "E:\新.mdb"
'执行select * into X in [b库路径] from X
'cn1.Execute "insert into 表A SELECT * form cn2.表A"
'insert into 表A(姓名) select 姓名 from 表A in 'e:\复制\新.mdb'