SQLStatement Tag

ClosedDescription

Sets the SQL statement that is used to query OLEDB and ODBC record set types.

ClosedSyntax

<SQLStatement>Value</SQLStatement>

Where Value equals a valid SQL query statement.

ClosedParent Tag

<RecordSet>

ClosedRemarks

The <SQLStatement> tag sets a custom SQL statement for record selection within ODBC and OLE databases. Setting the <SQLStatement> tag implies the use of a custom SQL statement, and the options that are found in the Tables, Query, Join, and Sort properties of an ODBC database configured in a format will be ignored.

<SQLStatement> is an optional tag that is used with the <Print>, <FormatSetup>, and <ExportPrintPreviewToImage> commands when the <RecordSet> tag is included in the script.

ClosedExample

<?xml version="1.0" encoding="utf-8"?>

<XMLScript Version="2.0" Name="09232006_103601_Job1" ID="123">

<Command Name="Job1">

<Print>

<Format>Label1.btw</Format>

<RecordSet Name="MS_SQL_DS2" Type="btODBC">

<UserId>/Michael</UserId>

<Password>xy111</Password>

<SQLStatement>SELECT * FROM Table WHERE Name='Product'</SQLStatement>

</RecordSet>

</Print>

</Command>

</XMLScript>

ClosedRequirements

BTXML Script version 1.0 (BarTender 8.0 and later versions)