|
|
|
Обработка БД
|
|||
|---|---|---|---|
|
#18+
Можно ли используя ADO выполнить запрос (Select .. join) к таблицам (БД) формат .DBF (FoxPro) находящихся в разных папках. Напишите пример синтаксиса. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 15.07.2003, 12:51 |
|
||
|
Обработка БД
|
|||
|---|---|---|---|
|
#18+
SELECT .... FROM tabl IN "C:\...." "dBASE IV;" а мож тебе энти таблицы(в разных папках) прилинковать и поплёвывать в потолок??? ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.07.2003, 10:26 |
|
||
|
Обработка БД
|
|||
|---|---|---|---|
|
#18+
2 Артист Расшифруйте пожалуйста!:) "С:\...." - это путь, ятак понимаю "dBASE IV;" - это что, простите, и почему через пробел?:) Geen ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.07.2003, 10:30 |
|
||
|
Обработка БД
|
|||
|---|---|---|---|
|
#18+
from help IN Clause Description Identifies tables in any external database to which the Microsoft Jet database engine can connect, such as a dBASE or Paradox database or an external Microsoft Jet database. Syntax To identify a destination table: [SELECT | INSERT] INTO destination IN {path | ["path" "type"] | ["" [type; DATABASE = path]]} To identify a source table: FROM tableexpression IN {path | ["path" "type"] | ["" [type; DATABASE = path]]} A SELECT statement containing an IN clause has these parts: Part Description destination The name of the external table into which data is inserted. tableexpression The name of the table or tables from which data is retrieved. This argument can be a single table name, a saved query, or a compound resulting from an INNER JOIN, LEFT JOIN, or RIGHT JOIN. path The full path for the directory or file containing table. type The name of the database type used to create table if a database isn't a Microsoft Jet database (for example, dBASE III, dBASE IV, Paradox 3.x, or Paradox 4.x). Remarks You can use IN to connect to only one external database at a time. In some cases, the path argument refers to the directory containing the database files. For example, when working with dBASE, FoxPro, or Paradox database tables, the path argument specifies the directory containing .dbf or .db files. The table file name is derived from the destination or tableexpression argument. To specify a non-Microsoft Jet database, append a semicolon (;) to the name, and enclose it in single (' ') or double (" ") quotation marks. For example, either 'dBASE IV;' or "dBASE IV;" is acceptable. You can also use the DATABASE reserved word to specify the external database. For example, the following lines specify the same table: ... FROM Table IN "" [dBASE IV; DATABASE=C:\DBASE\DATA\SALES;]; ... FROM Table IN "C:\DBASE\DATA\SALES" "dBASE IV;" Notes For improved performance and ease of use, use a linked table instead of IN. You can also use the IN reserved word as a comparison operator in an expression. For more information, see the In operator. See Also Connect property ("DAO Language Reference"), FROM clause, INNER JOIN operation, INSERT INTO statement, LEFT JOIN, RIGHT JOIN operations, SELECT statement, SELECT...INTO statement. Example The following table shows how you can use the IN clause to retrieve data from an external database. In each example, assume the hypothetical Customers table is stored in an external database. External database SQL statement Microsoft Jet database SELECT CustomerID FROM Customers IN OtherDB.mdb WHERE CustomerID Like "A*"; dBASE III or IV. To retrieve data from a dBASE III table, substitute "dBASE III;" for "dBASE IV;". SELECT CustomerID FROM Customer IN "C:\DBASE\DATA\SALES" "dBASE IV;" WHERE CustomerID Like "A*"; dBASE III or IV using Database syntax. SELECT CustomerID FROM Customer IN "" [dBASE IV; Database=C:\DBASE\DATA\SALES;] WHERE CustomerID Like "A*"; Paradox 3.x or 4.x. To retrieve data from a Paradox version 3.x table, substitute "Paradox 3.x;" for "Paradox 4.x;". SELECT CustomerID FROM Customer IN "C:\PARADOX\DATA\SALES" "Paradox 4.x;" WHERE CustomerID Like "A*"; Paradox 3.x or 4.x using Database syntax. SELECT CustomerID FROM Customer IN "" [Paradox 4.x;Database=C:\PARADOX\DATA\SALES;] WHERE CustomerID Like "A*"; (continued) A Microsoft Excel worksheet SELECT CustomerID, CompanyName FROM [Customers$] IN "c:\documents\xldata.xls" "EXCEL 5.0;" WHERE CustomerID Like "A*" ORDER BY CustomerID; A named range in a worksheet SELECT CustomerID, CompanyName FROM CustomersRange IN "c:\documents\xldata.xls" "EXCEL 5.0;" WHERE CustomerID Like "A*" ORDER BY CustomerID; Example (Microsoft Access) The following table shows how you can use the IN clause to retrieve data from an external database. Each example assumes the Customers table is stored in an external database. Note The SQL IN clause is different than the SQL In operator, which is used to determine whether the value of an expression is equal to any of several values in a specified list. External database SQL statement Microsoft Jet database. JetData.mdb is the name of the Jet database that contains the Customers table. SELECT CustomerID FROM Customers IN 'C:\My Documents\JetData.mdb' WHERE CustomerID Like 'A*'; Microsoft Excel workbook (.xls file). XLData.xls is a Microsoft Excel workbook that contains a worksheet called Customers. CustomersRange is a named range in that worksheet. Note that to denote the entire worksheet as the table, you must append a dollar sign ($) and enclose the name in brackets. SELECT CustomerID, CompanyName FROM [Customers$] IN 'C:\My Documents\XLData.xls' 'EXCEL 5.0;' WHERE CustomerID Like 'A*'; – or – SELECT CustomerID, CompanyName FROM CustomersRange IN 'C:\My Documents\XLData.xls' 'EXCEL 5.0;' WHERE CustomerID Like 'A*'; dBASE III or IV. To retrieve data from a dBASE III table, substitute dBASE III for dBASE IV. SELECT CustomerID FROM Customers IN C:\DBASE\DATA\SALES dBASE IV; WHERE CustomerID Like A*; (continued) External database SQL statement dBASE III or IV (by using DATABASE syntax). To retrieve data from a dBASE III table, substitute dBASE III for dBASE IV. SELECT CustomerID FROM Customers IN [dBASE IV;DATABASE=C:\DBASE\DATA\SALES;] WHERE CustomerID Like A*; Paradox 3.x or 4.x. To retrieve data from a Paradox version 3.x table, substitute Paradox 3.x for Paradox 4.x. SELECT CustomerID FROM Customers IN C:\PARADOX\DATA\SALES Paradox 4.x; WHERE CustomerID Like A*; Paradox 3.x or 4.x (by using DATABASE syntax). To retrieve data from a Paradox version 3.x table, substitute Paradox 3.x for Paradox 4.x. SELECT CustomerID FROM Customers IN [Paradox 4.x;DATABASE=C:\PARADOX\DATA\SALES;] WHERE CustomerID Like A*; ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.07.2003, 10:39 |
|
||
|
Обработка БД
|
|||
|---|---|---|---|
|
#18+
Ну ни фига себе Который из них *.dbf (dBASE что ли?:)) Geen ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.07.2003, 10:54 |
|
||
|
Обработка БД
|
|||
|---|---|---|---|
|
#18+
Который из них *.dbf (dBASE что ли?:)) А как ты догадался? :) ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 16.07.2003, 10:58 |
|
||
|
Обработка БД
|
|||
|---|---|---|---|
|
#18+
SELECT * FROM Person IN 'C:\a-soft\argo\dat'[Paradox 4.X;]; А у меня пишет: "couldn't find installable ISAM" - это в MSA97, а MSA2002 все работает. Я подозреваю, что у меня не прописан этот гребаный Paradox как ISAM, хотя и BDE и куча заплаток. Может подскажете в чем дело. Или вышлете экспортированную ветвь реестра [HKEY_LOCAL_MACHINE\Software\Microsoft\Jet и [HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0] у кого эта шняга под MSA97 работает ... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.09.2003, 01:45 |
|
||
|
Обработка БД
|
|||
|---|---|---|---|
|
#18+
SELECT * FROM Person IN 'C:\a-soft\argo\dat'[Paradox 4.X;]; А у меня пишет: "couldn't find installable ISAM" - это в MSA97, а MSA2002 все работает. Я подозреваю, что у меня не прописан этот гребаный Paradox как ISAM, хотя и BDE и куча заплаток. Может подскажете в чем дело. Или вышлете экспортированную ветвь реестра [HKEY_LOCAL_MACHINE\Software\Microsoft\Jet и [HKEY_LOCAL_MACHINE\Software\Microsoft\Office\8.0] у кого эта шняга под MSA97 работает ... ... |
|||
|
:
Нравится:
Не нравится:
|
|||
| 20.09.2003, 01:45 |
|
||
|
|

start [/forum/topic.php?fid=45&msg=32270868&tid=1679344]: |
0ms |
get settings: |
11ms |
get forum list: |
17ms |
check forum access: |
5ms |
check topic access: |
5ms |
track hit: |
70ms |
get topic data: |
13ms |
get forum data: |
3ms |
get page messages: |
64ms |
get tp. blocked users: |
2ms |
| others: | 239ms |
| total: | 429ms |

| 0 / 0 |
