RecordSet Tag |
The root tag for Record Set tags. The Record Set tags set how BarTender uses recordset data.
<RecordSet Name=Value Type=Value [AddIfNone=Value]>...</RecordSet>
The supported attributes include:
Attribute |
Required/Optional |
Description |
---|---|---|
Name |
Required |
Name of the record set. |
Type |
Required |
Type of record set. Valid values are:
|
AddIfNone |
Optional |
Adds the record set as a text file database connection if no other text file database connections exist. Only applies to the Text File database type (btTextFile). The default is false if not specified. |
The following child element tags are supported:
Tag |
Required/Optional |
Description |
---|---|---|
Optional |
Set the field delimitation type for a text record set. |
|
Optional |
Set the field delimiter for a text file with Custom Field delimitation. Valid for Text record set types only. |
|
Optional |
Set the file name used for Text or SAP IDoc record set types. |
|
Optional |
Set the number of fields to scan per record in a Text record set. |
|
Optional |
Set the password used to log into the database. Used for OLEDB and ODBC record set types. |
|
Optional |
Set the SQL statement used for OLEDB and ODBC record set types. |
|
Optional |
Set the text data for the record set. Valid for text record set types only. It is available for the Print command but not the FormatSetup command. |
|
Optional |
Set whether or not to use the field names from the first record of a text file. Valid for Text record set types only. |
|
Optional |
Set the user Id used to log into the database. Used for OLEDB and ODBC record set types. |
When the database type is btTextFile, the record set will loop through all of the available text database files looking for the correct file. If the correct file is found, it will replace the file with the temp file name/data. If the text database is not found, but AddIfNone is set to true, a text database will be added. If no text database is found and AddIfNone is set to false, the print job will stop and the following error will display: Database is not found. Please check your BarTender document database connections.
When the database type is btOLEDB, btODBC or btSAPIDOC, the AddIfNone attribute is ignored and the record set will loop through all of the available database files looking for the correct file. If the correct file is found, it will apply all child settings and actions to the file. If the database is not found, the print job will stop and the following error will display: Database is not found. Please check your BarTender document database connections.
<RecordSet> is an optional tag that can be used with the <FormatSetup>, <Print>, and <ExportPrintPreviewToImage> commands.
This example demonstrates the <RecordSet> tag contained within the <Print> command. The <RecordSet> tag can also be contained within the <FormatSetup> and <ExportPrintPreviewToImage> commands.
<?xml version="1.0" encoding="utf-8"?>
<XMLScript Version="2.0" Name="09232006_103601_Job1" ID="123">
<Command Name="Job1">
<Print>
<Format>Document1.btw</Format>
<RecordSet Name="Text Document 1" Type="btTextFile">
<Delimitation>btDelimQuoteAndComma</Delimitation>
<UseFieldNamesFromFirstRecord>true</UseFieldNamesFromFirstRecord>
<TextData>
<![CDATA["FirstName","LastName","City","Zip Code"
"Adam","Jones","Bellevue","98008"
"John","Smith","Kirkland","98293"]]>
</TextData>
</RecordSet>
</Print>
</Command>
</XMLScript>
BTXML Script version 1.0 (BarTender 8.0 and higher)