Форум: "Базы";
Текущий архив: 2002.03.21;
Скачать: [xml.tar.bz2];
ВнизКак через ADO подключится к текстовому файлу? Найти похожие ветки
← →
Yephim (2002-02-20 09:52) [0]собственно сабж. На сайте микрософта на шел следующий текст
To set up a linked server against a formatted text file:
Microsoft OLE DB Provider for Jet can be used to access and query text files.
To create a linked server for accessing text files directly without linking the files as tables in an Access .mdb file, execute sp_addlinkedserver, as in this example.
The provider is Microsoft.Jet.OLEDB.4.0 and the provider string is "Text". The data source is the full path name of the directory that contains the text files. A schema.ini file, which describes the structure of the text files, must exist in the same directory as the text files. For more information about creating a schema.ini file, see the Jet Database Engine documentation.
--Create a linked server.
EXEC sp_addlinkedserver txtsrv, "Jet 4.0",
"Microsoft.Jet.OLEDB.4.0",
"c:\data\distqry",
NULL,
"Text"
GO
--Set up login mappings.
EXEC sp_addlinkedsrvlogin txtsrv, FALSE, NULL, Admin, NULL
GO
--List the tables in the linked server.
EXEC sp_tables_ex txtsrv
GO
--Query one of the tables: file1#txt
--using a 4-part name.
SELECT *
FROM txtsrv...[file1#txt]
Как эту беду присобачить к дельфи?
И второй вопрос на засыпку, пытался присоединить файл к Ассess и что у меня получилось. если файл с расширением log то пишет не доступа read only и ни хрена не коннектится, меняю расширение на txt все работает к чему бы это?
Страницы: 1 вся ветка
Форум: "Базы";
Текущий архив: 2002.03.21;
Скачать: [xml.tar.bz2];
Память: 0.44 MB
Время: 0.006 c