|
Как объединить по OLEDB в одном RecordSet наборы из разных провайдеров
|
|||
---|---|---|---|
#18+
Как объединить по технологии OLEDB в одном recordset наборы из разных баз данных? Например, следующий кусок дает ошибку на set rs=... Run-time error '-2147217865 (80040e37)': The Microsoft Jet database engine can't find input table or query 'Authors' Make sure it exist and that its name is spelled correctly. : Dim cn As ADODB.Connection, cn1 As ADODB.Connection Dim rs As ADODB.Recordset , rs1 As ADODB.Recordset Set cn = New ADODB.Connection Set cn1 = New ADODB.Connection cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\Program Files\Microsoft Visual Studio\VB98\biblio.mdb" cn1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=C:\Program Files\Microsoft Visual Studio\VB98 wind.mdb" cn.Open cn1.Open Set rs = cn.Execute("Select Authors.Author ,Employees.EmlpoyeeID " & _ "from Authors,Employees in 'C:\Program Files\Microsoft Visual Studio\VB98 wind.mdb' ") А вообще нужно чуть сложнее - брать данные из именованного диапазона книги Exel, да и еще нескольких других источников *.dbf , например : Set rs = cn.Execute("Select Authors.Author ,tabl1.поле1, tabl1.поле2, tabl1.поле3 " & _ "from Authors, tabl1 in 'c:\MyApp\NyVB\3\Книга1.xls' 'Excel 8.0;' where AuthorID=... ") ... |
|||
:
Нравится:
Не нравится:
|
|||
20.07.2001, 16:19 |
|
|
start [/forum/topic.php?desktop=1&fid=60&tid=2171688]: |
0ms |
get settings: |
8ms |
get forum list: |
11ms |
check forum access: |
4ms |
check topic access: |
4ms |
track hit: |
30ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
40ms |
get tp. blocked users: |
2ms |
others: | 11ms |
total: | 126ms |
0 / 0 |