_XOnDAO2_EasyAccess_VIs.vi

Description

These VI's shows you a higher level access to some DAO functions.



Database Close (Easy)

Call this function to close a database in a easy way. It is useful to combine this function with other Easy Level functions. You only have to connect recordset handle. If an error occurs during execution it is returned by the erreor cluster. Use the function Database Error Handler (Easy) to handle this error cluster.

Parameters

RSHandle in The handle of the recordset

error in - a cluster describing the error state before executing the current VI. If the error state is TRUE, the VI will just pass the error cluster and incoming handle, no operation will happen.

error out - a cluster that describes the error status after this VI executes. If the error status is TRUE, an error occured. The DAO Error message (AKA source) is combined from the DAO-dll-call, and, where available, additional input-parameters. The DAO Error codes are always defined as:

-1 Handle not initialized

-2 Error

XOn Software GmbH


Connector Pane

Database Close (Easy)


Controls and Indicators

cdlrn

RSHandle in

cclst

error in

error out is a cluster that describes the error status after this VI executes. If an error occurred before this VI was called, error out is the same as error in. Otherwise, error out shows the error, if any, that occurred in this VI. Use the error handler VIs to look up the error code and to display the corresponding error message. Using error in and error out clusters is a convenient way to check errors and to specify execution order by wiring the error output from one subVI to the error input of the next.

iclst

error out

error out is a cluster that describes the error status after this VI executes. If an error occurred before this VI was called, error out is the same as error in. Otherwise, error out shows the error, if any, that occurred in this VI. Use the error handler VIs to look up the error code and to display the corresponding error message. Using error in and error out clusters is a convenient way to check errors and to specify execution order by wiring the error output from one subVI to the error input of the next.


Database Open (Easy)

Call this function to open a database in a easy way. It is useful to combine this function with other Easy Level functions. You only have to connect the database path and the table name to open the spezified database. If the database path is empty, a filedialog is displayed. If the user cancels the dialog the boolean flag „Dialog Canceled“ will be set to TRUE. If an error occurs during opening the database it is returned by the erreor cluster. Use the function Database Error Handler (Easy) to handle this error cluster.

Note:

Because of this is an easy function always the whole table is selected.

Parameters

Database Path The path to the database file ( If empty, a filedialog is displayed)

Table Name The name of the table you want to access

RSHandle out The handle of a recordset you can access

Dialog Canceled A boolean blag, TRUE if the filedialog was canceled by the user

error in - a cluster describing the error state before executing the current VI. If the error state is TRUE, the VI will just pass the error cluster and incoming handle, no operation will happen.

error out - a cluster that describes the error status after this VI executes. If the error status is TRUE, an error occured. The DAO Error message (AKA source) is combined from the DAO-dll-call, and, where available, additional input-parameters. The DAO Error codes are always defined as:

-1 Handle not initialized

-2 Error


Connector Pane

Database Open (Easy)


Controls and Indicators

cpath

Database Path (Dialog if Empty)

cstr

Table Name

cclst

error in (no error)

The error in cluster can accept error information wired from VIs previously called. Use this information to decide if any functionality should be bypassed in the event of errors from other VIs.

The pop-up option Explain Error (or Explain Warning) gives more information about the error displayed.

iclst

error out

error out is a cluster that describes the error status after this VI executes. If an error occurred before this VI was called, error out is the same as error in. Otherwise, error out shows the error, if any, that occurred in this VI. Use the error handler VIs to look up the error code and to display the corresponding error message. Using error in and error out clusters is a convenient way to check errors and to specify execution order by wiring the error output from one subVI to the error input of the next.

idlrn

RSHandle out

ibool

Dialog Canceled

Get Columnlist (Easy))

Call this function to get a list of the column names and types of the current table in an easy way. It is useful to combine this function with other Easy Level functions. You only have to connect recordset handle. If an error occurs during execution it is returned by the erreor cluster. Use the function Database Error Handler (Easy) to handle this error cluster.

error in - a cluster describing the error state before executing the current VI. If the error state is TRUE, the VI will just pass the error cluster and incoming handle, no operation will happen.

Parameters

RSHandle in The handle of the recordset

Error in Error Cluster input

RSHandle out The handle of the recordset

Columnlist List of columns of the selected table with column name and type

Error out - a cluster that describes the error status after this VI executes. If the error status is TRUE, an error occured. The DAO Error message (AKA source) is combined from the DAO-dll-call, and, where available, additional input-parameters. The DAO Error codes are always defined as:

-1 Handle not initialized

-2 Error

XOn Software GmbH


Connector Pane

Get Columnlist (Easy))


Controls and Indicators

cdlrn

RSHandle in

cclst

error in (no error)

error in is a cluster that describes the error status before this VI executes. If error in indicates that an error occurred before this VI was called, this VI may choose not to execute its function, but just pass the error through to its error out cluster. If no error has occurred, then this VI executes normally and sets its own error status in error out. Use the error handler VIs to look up the error code and to display the corresponding error message. Using error in and error out clusters is a convenient way to check errors and to specify execution order by wiring the error output from one subVI to the error input of the next.

idlrn

RSHandle out

iclst

error out

error out is a cluster that describes the error status after this VI executes. If an error occurred before this VI was called, error out is the same as error in. Otherwise, error out shows the error, if any, that occurred in this VI. Use the error handler VIs to look up the error code and to display the corresponding error message. Using error in and error out clusters is a convenient way to check errors and to specify execution order by wiring the error output from one subVI to the error input of the next.

i1dclst

Column List

GetTableNames (Easy)

Use this VI to get smal overview for all Tables in a Database. Depending on the Database, there are different Table Types available, for example System Tables, Attached Tables aso.


Connector Pane

GetTableNames (Easy)


Controls and Indicators

cdlrn

DBHandle in

cclst

error in

i1dstr

Tables

idlrn

DBHandle out

iclst

error out

i1dstr

Tables (all)

Read Records (Easy)

Call this function to get the data of the current record in an easy way. It is useful to combine this function with other Easy Level functions. You only have to connect recordset handle and the Columnlist you want to read Use the function GetColumnlist (Easy) to get all the columns in the table. The data of the cluster is returned as a stringarray. All datatypes are formatted as a string. So you have to scan them to retrieve the original data. If an error occurs during execution it is returned by the erreor cluster.

Parameters

RSHandle in The handle of the recordset

Columnlist List of columns you want to read

Error in Error Cluster input

RSHandle out The handle of the recordset

Record Data Stringarray of record data

error in - a cluster describing the error state before executing the current VI. If the error state is TRUE, the VI will just pass the error cluster and incoming handle, no operation will happen.

error out - a cluster that describes the error status after this VI executes. If the error status is TRUE, an error occured. The DAO Error message (AKA source) is combined from the DAO-dll-call, and, where available, additional input-parameters. The DAO Error codes are always defined as:

-1 Handle not initialized

-2 Error

XOn Software GmbH


Connector Pane

Read Records (Easy)


Controls and Indicators

cclst

error in

cdlrn

RSHandle in

i2dstr

Records

iclst

error out

idlrn

RSHandle out

SetPrimField (Easy)

This handy VI creates a primary Key Field in a Table. Use as an example of Field Info Properties.


Connector Pane

SetPrimField (Easy)


Controls and Indicators

cclst

error out

cdlrn

TDHandle out

cstr

Name

idlrn

TDHandle in

iclst

error in (no error)

SetPrimTableField (Easy)

Call this VI to create a new Field in a new created Table and use it as a primary key within the Table.

DBHandle in - Handle of the Database input

TableName(toCreate) - creates a new Table in the Database

Field(ToCreate) - create this Field and sets it as a primary field

error in - a cluster describing the error state before executing the current VI. If the error state is TRUE, the VI will just pass the error cluster and incoming handle, no operation will happen.

error out - a cluster that describes the error status after this VI executes. If the error status is TRUE, an error occured. The DAO Error message (AKA source) is combined from the DAO-dll-call, and, where available, additional input-parameters. The DAO Error codes are always defined as:

-1 Handle not initialized

-2 Error


Connector Pane

SetPrimTableField (Easy)


Controls and Indicators

cclst

Field(toCreate)

cstr

TableName(toCreate)

cclst

error out

cdlrn

DBHandle in

iclst

error in (no error)

idlrn

DBHandle out

Write Record (Easy)

Call this function to write data to a record in an easy way. It is useful to combine this function with other Easy Level functions.You only have to connect recordset handle,the Columnlist you want to write and a stringarray with the data you want to write. You must format all datatypes as a string. Use the function GetColumnlist (Easy) to get all the columns in the table. If an error occurs during execution it is returned by the erreor cluster. Use the function Database Error Handler (Easy) to handle this error cluster.

XOn Software GmbH


Connector Pane

Write Record (Easy)


Controls and Indicators

cdlrn

RSHandle in

c1dclst

Column List

c1dstr

Record Data

cclst

error in (no error)

error in is a cluster that describes the error status before this VI executes. If error in indicates that an error occurred before this VI was called, this VI may choose not to execute its function, but just pass the error through to its error out cluster. If no error has occurred, then this VI executes normally and sets its own error status in error out. Use the error handler VIs to look up the error code and to display the corresponding error message. Using error in and error out clusters is a convenient way to check errors and to specify execution order by wiring the error output from one subVI to the error input of the next.

cenum

Mode

cbool

ByIdx

idlrn

RSHandle out

iclst

error out

error out is a cluster that describes the error status after this VI executes. If an error occurred before this VI was called, error out is the same as error in. Otherwise, error out shows the error, if any, that occurred in this VI. Use the error handler VIs to look up the error code and to display the corresponding error message. Using error in and error out clusters is a convenient way to check errors and to specify execution order by wiring the error output from one subVI to the error input of the next.