Previous Topic: SQL Adapter Connection StringNext Topic: Reading Records from a File Data Source


Elements & Attributes

ConnectionString Element

This element can contain segment child elements. If it contains at least one segment element, the connection string is concatenated with that. Otherwise, the connection string is taken from the ConnectionString element text (as in the current version).

Segment Element

This element contains one mandatory attribute called Type, which has two legal values; text and file. When the Type="file", the Segment element must contain at least one File element. Each File element is considered a different query.

File Element

This element contains attributes that define which file(s) should be used in the connection string and what must be done with the file when the Adapter has finished reading it.

Internal variables

Two additional internal variables have been added and can be used in the SelectStatement and SelectInitialValues elements. These are:

Examples

Example 1: Simple connection string for Oracle:

<ConnectionString> Provider=msdasql;dsn=O; uid=O; pwd=O </ConnectionString>

or

<ConnectionString>
   <Segement Type="text" Text="Provider=msdasql;"/>
   <Segement Type="text" Text="dsn=O; "/>
   <Segement Type="text" Text="uid=O; "/>
   <Segement Type="text" Text="pwd=O; "/>
</ConnectionString>

Example 2: Simple connection string for Excel with a single file:

<ConnectionString>Driver={Microsoft Excel Driver (*.xls)}; DriverId=790;
                                Dbq=d:\Oblicore\Availabilty_2003_01.XLS
</ConnectionString>

or

<ConnectionString>
   <Segement Type="text" Text=" Driver={Microsoft Excel Driver (*.xls)};"/>
   <Segement Type="text" Text=" DriverId=790;"/>
   <Segement Type="text" Text=" Dbq="/>
   <Segement Type="File">
        <File Path="d:\Oblicore " NamePattern="Availabilty_2003_01.XLS">
   </Segement>
</ConnectionString>

Example 3: Simple connection string for use with several Excel files:

<ConnectionString>
   <Segement Type="text" Text=" Driver={Microsoft Excel Driver (*.xls)};"/>
   <Segement Type="text" Text=" DriverId=790;"/>
   <Segement Type="text" Text=" Dbq="/>
   <Segement Type="File">
        <File Path="d:\Oblicore ",NamePattern="Availabilty_*.XLS"/>
   </Segement>
</ConnectionString>

Example 4: Using a standard ODBC DSN entry:

Using a standard ODBC DSN entry you can connect to any source that has a DSN entry created in the ODBC manager on the application server. The standard ODBC DSN entry can be found in the 'Administrative Tools' section of the server.

<ConnectionString>dsn=SampleDataSource;usr=scott;pwd=tiger;</ConnectionString>