Dim Conn As New ADODB.Connection
Conn.ConnectionString
= "Provider=MSDAORA.1;Password=admin;User ID= admin;
Data Source=fuj;Persist Security Info=True"
Conn.Open
SQL = "SELECT * FROM TBL_SCORE "
Set RS = DB.OpenRecordset(SQL)
If RS.EOF = False Then
ReDim ScoreArray(SumCount)
End If
iCount = 1
Do Until RS.EOF
in_array(iCount).NENDO = RS!NENDO
...
Loop ' 读ACCESS表
SQL = "SELECT * FROM test_1 where ..." Dim Rs2 As New ADODB.Recordset
Rs2.CursorLocation = adUseClient
Rs2.Open SQL, Conn, , adLockOptimistic If Rs2.EOF Then
Rs2.AddNew
Rs2("NENDO") = ScoreArray(iCount).NENDO '写ORACLE表
end if
...
Rs2.Close
我以前用VBA写的,你可以参考一下.
Conn.ConnectionString
= "Provider=MSDAORA.1;Password=admin;User ID= admin;
Data Source=fuj;Persist Security Info=True"
Conn.Open
SQL = "SELECT * FROM TBL_SCORE "
Set RS = DB.OpenRecordset(SQL)
If RS.EOF = False Then
ReDim ScoreArray(SumCount)
End If
iCount = 1
Do Until RS.EOF
in_array(iCount).NENDO = RS!NENDO
...
Loop ' 读ACCESS表
SQL = "SELECT * FROM test_1 where ..." Dim Rs2 As New ADODB.Recordset
Rs2.CursorLocation = adUseClient
Rs2.Open SQL, Conn, , adLockOptimistic If Rs2.EOF Then
Rs2.AddNew
Rs2("NENDO") = ScoreArray(iCount).NENDO '写ORACLE表
end if
...
Rs2.Close
我以前用VBA写的,你可以参考一下.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货