是否可以将一个记录集中的Oracle表和Access表与ADO组合?
我可以使用两个Access表,但不能使用一个Oracle和一个Access。 任何帮助将不胜感激。
修改 使用两次访问的工作代码
<?php
$csv = fopen( "/home/user/file.csv", 'w+' );
foreach ($_POST["fields_string"] as $fields) {
fputcsv($csv, $fields, ";");
}
fclose($csv);
?>
具有一个访问权限和一个oracle的非工作代码
Sub twoDB()
Dim con As ADODB.Connection
Dim strDB1 As String
Dim strDB2 As String
Dim rs As ADODB.Recordset
Set con = New ADODB.Connection
strDB1 = ".......\daotest.accdb"
strDB2 = ".......\daotest2.accdb"
mysql = "select * from [" & strDB1 & "].şubeler inner join [" & strDB2 & "].şb on (şb.şb=şubeler.SubeKodu)"
With con
.ConnectionString = "Provider = Microsoft.ACE.OLEDB.12.0; data source=" & strDB2 'oledb, odbc için: con.ConnectionString = "Driver={Microsoft Access Driver (*.mdb, *.accdb)};Dbq=" & strDB 'odbc
.Mode = adModeWrite
.Open
End With
Set rs = New ADODB.Recordset
rs.Open mysql, con, adOpenDynamic, adLockReadOnly
ActiveCell.CopyFromRecordset rs
End Sub