connection via odbc

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Cogito
Posts: 24
Joined: Sat 05 Jul 2008 07:15

connection via odbc

Post by Cogito » Wed 10 Mar 2010 10:15

Hello,

is it possible to create a connection via odbc to excel and csv files and work with this connection exact like another connections (that means with a query component) and show data or query data like normal tables in databases? Is there a precondition for such an excel, xml or csv file regarding its structure or anything else?

Challenger
Devart Team
Posts: 925
Joined: Thu 17 Nov 2005 10:53

Post by Challenger » Mon 22 Mar 2010 09:05

You can create ODBC datasource and Cells range in the way described here:

http://support.microsoft.com/default.as ... US;Q195951&

Than you have perform the following steps:
1. Setup ODBC datasource, specify .xls file.
2. Specify ProviderName for TUniConnection.
3. Specify SQL property for TUniQuery or TableName property for TUniTable, corresponds to worksheetes names. worksheets play role of tables for Excel ODBC datasource.

Post Reply