|
TFORMer SDK - NET
7.5
|
Provides access to JobDataOdbc (an ODBC connection that serves as JobData for a Job). More...
Public Member Functions | |
| JobDataOdbc () | |
| Constructor for JobDataOdbc. More... | |
| JobDataOdbc (string dsn, string user, string password, string sqlSelect) | |
| Constructor for JobDataOdbc. More... | |
Properties | |
| string | Dsn [get, set] |
| Gets/Sets the DSN (ODBC data-source-name). More... | |
| bool | HandleEscapeSequences [get, set] |
| Gets/Sets a flag indicating whether escape sequences in DataField values like \n or \x40 should be translated by TFORMer SDK. More... | |
| string | Password [get, set] |
| Gets/Sets the password for the database connection. More... | |
| bool | ReuseValues [get, set] |
| Gets/Sets a flag indicating whether DataField values should be reused in consecutive Records. More... | |
| string | SqlSelect [get, set] |
| Gets/Sets the SQL select statement for fetching the records from the database. More... | |
| string | User [get, set] |
| Gets/Sets the user-name for the database connection. More... | |
Provides access to JobDataOdbc (an ODBC connection that serves as JobData for a Job).
The JobDataOdbc enables TFORMer SDK to use arbitrary database-tables or queries as JobData for printing a Job.
The data in such a table provides the values of the DataFields. The table is read Record by Record using the specified SQL SELECT statement. TFORMer SDK matches the column-names of the table or query with the corresponding DataField names in the FormLayout. If required use SQL aliases to provide identical column names.
The order of the columns in the table or query does not matter.
The DSN represents the name of the database connection as defined in the Microsoft Windows Control Panel. Please keep in mind that the DSN is a part of the connection string and thus a complete specification is required.
This may yield the following code:
This example demonstrates how to use the pre-installed ODBC data-source (named TFORMer_Sample) for generating a report as PDF. The table tbl_Example looks like follows:
| ChapterNumber | Caption | PageNumber |
|---|---|---|
| 1 | Content | 2 |
| 1.1 | Table of Figures | 6 |
| 1.2 | List of Tables | 6 |
| 2 | Disclaimer | 7 |
| ... | ... | ... |
This is the code to use this table as a JobDataOdbc:
For a general description see JobData.
| JobDataOdbc | ( | ) |
Constructor for JobDataOdbc.
Initializes a new instance of the JobDataOdbc class.
| JobDataOdbc | ( | string | dsn, |
| string | user, | ||
| string | password, | ||
| string | sqlSelect | ||
| ) |
Constructor for JobDataOdbc.
Initializes a new instance of the JobDataOdbc class.
| dsn | The DSN (ODBC data-source name) |
| user | The (optional, may be empty) user name as required by the ODBC connection |
| password | The (optional, may be empty) password as required by the ODBC connection |
| sqlSelect | The SQL-SELECT statement |
|
getset |
|
getsetinherited |
Gets/Sets a flag indicating whether escape sequences in DataField values like \n or \x40 should be translated by TFORMer SDK.
true if escape sequences in DataField values are translated
|
getset |
Gets/Sets the password for the database connection.
It depends on the database connection if the password is required or not.
|
getsetinherited |
|
getset |
Gets/Sets the SQL select statement for fetching the records from the database.
|
getset |
Gets/Sets the user-name for the database connection.
It depends on the database connection if the user-name is required or not.
| © 2006-2017 - all rights reserved by TEC-IT Datenverarbeitung GmbH |
![]() |
| Generated on Fri Nov 3 2017 07:59:04 for TFORMer SDK - NET with doxygen 1.8.9.1 |