ODBC Library/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
 
(10 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 4: Zeile 4:
Almost every relational database provides an ODBC driver and is thus accessable.
Almost every relational database provides an ODBC driver and is thus accessable.


Make sure that ODBC has been installed and configured on your machine, when using ODBC actions (on most machines, this is already installed, and you have to define the mapping from logical database names to driver type, host, username etc. in a setup dialog).
Make sure that ODBC has been installed and configured on your machine, when using ODBC actions (on most machines, this is already installed, and you have to define the mapping from logical database names to driver type, host, username etc. in a setup dialog). This is operating system specific and out of the scope of the expecco documentation. Please consult your administrator on how to setup the ODBC configuration.


[[Datei:TypicalODBCUse.png|mini|Typical ODBC Setup]]
{{noprint| 1=
Back to [[Online Documentation#Library_and_Plugin_Overview|Online Documentation]]
}}


== Connecting / Disconnecting ==
== Connecting / Disconnecting ==
Zeile 14: Zeile 12:
==== [ODBC] Connect ====
==== [ODBC] Connect ====
Establishes a connection to a database. You have to provide the logical name of the database, and possibly a user/password combination. The logical name is typically specified in your operating systems ODBC configuration dialog.
Establishes a connection to a database. You have to provide the logical name of the database, and possibly a user/password combination. The logical name is typically specified in your operating systems ODBC configuration dialog.
Upon success, a session handle is written to the output pin. This is needed to further talk to the
Upon success, a session handle is written to the output pin. This is needed to further talk to the database, and should either be stored in a variable, or passed along a pin-connection to one of the query actions below.
database, and either stored in a variable, or passed along a pin-connection to one of the query actions below.


==== [ODBC] Disconnect ====
==== [ODBC] Disconnect ====
Zeile 22: Zeile 19:
== SQL Queries ==
== SQL Queries ==


==== [ODBC] Execute-BlockOut ====
-- to be documented --

Executes an SQL statement and provides the resulting rows as a single (possibly big) collection of individual rows. The statement is a string which must represent a valid SQL statement. The receiving action will be triggered once.
For example, "select name,telno from myTable" will generate a collection consisting of 2-valued rows, each containing name and telno from the table.

==== [ODBC] Execute-StreamOut ====

Similar to the above, but the resulting rows are sent individually to the output pin. Thus, for every result, one output tuple is generated, and the receiving action will be triggered once for each.

The library provides additional actions which execute a parametrized SQL statement. These have addition input pins to fill in placeholders in a statement template.

== DB Queries ==

==== [ODBC] Get ODBC Info ====
This and other info actions retrieve meta information about the ODBC version, the table names, columns, keys etc.

<hr>
{{noprint| 1=
Back to [[Online Documentation#Library_and_Plugin_Overview|Online Documentation]]
}}

Aktuelle Version vom 6. Dezember 2021, 11:19 Uhr

Introduction[Bearbeiten]

The ODBC Library contains action blocks to access databases via the ODBC interface, which is a common database access layer providing a common API to different databases. Almost every relational database provides an ODBC driver and is thus accessable.

Make sure that ODBC has been installed and configured on your machine, when using ODBC actions (on most machines, this is already installed, and you have to define the mapping from logical database names to driver type, host, username etc. in a setup dialog). This is operating system specific and out of the scope of the expecco documentation. Please consult your administrator on how to setup the ODBC configuration.

Typical ODBC Setup

Connecting / Disconnecting[Bearbeiten]

[ODBC] Connect[Bearbeiten]

Establishes a connection to a database. You have to provide the logical name of the database, and possibly a user/password combination. The logical name is typically specified in your operating systems ODBC configuration dialog. Upon success, a session handle is written to the output pin. This is needed to further talk to the database, and should either be stored in a variable, or passed along a pin-connection to one of the query actions below.

[ODBC] Disconnect[Bearbeiten]

Closes a database connection. Takes a connection handle as generated by "[ODBC] Connect" as input.

SQL Queries[Bearbeiten]

[ODBC] Execute-BlockOut[Bearbeiten]

Executes an SQL statement and provides the resulting rows as a single (possibly big) collection of individual rows. The statement is a string which must represent a valid SQL statement. The receiving action will be triggered once. For example, "select name,telno from myTable" will generate a collection consisting of 2-valued rows, each containing name and telno from the table.

[ODBC] Execute-StreamOut[Bearbeiten]

Similar to the above, but the resulting rows are sent individually to the output pin. Thus, for every result, one output tuple is generated, and the receiving action will be triggered once for each.

The library provides additional actions which execute a parametrized SQL statement. These have addition input pins to fill in placeholders in a statement template.

DB Queries[Bearbeiten]

[ODBC] Get ODBC Info[Bearbeiten]

This and other info actions retrieve meta information about the ODBC version, the table names, columns, keys etc.


Back to Online Documentation



Copyright © 2014-2024 eXept Software AG