When you work with an ASA table in the DataWindow, Data Pipeline, or Database painter, the default behavior is to treat any column named timestamp as an ASA Transact-SQL special timestamp column.
You can create a Transact-SQL special timestamp column in an ASA table.
To create a Transact-SQL special timestamp column in an ASA table in PowerBuilder:
Give the name timestamp to any column having a timestamp datatype that you want treated as a Transact-SQL special timestamp column. Do this in one of the following ways:
In the painter – Select timestamp as the column name. (For instructions, see the User’s Guide.)
In a SQL CREATE TABLE statement – Follow the “CREATE TABLE example”.
Specify timestamp as the default value for the column. Do this in one of the following ways:
In the painter – Select timestamp as the default value for the column. (For instructions, see the User’s Guide.)
In a SQL CREATE TABLE statement – Follow the “CREATE TABLE example”.
If you are working with the table in the Data Pipeline painter, select the initial value exclude for the special timestamp column from the drop-down list in the Initial Value column of the workspace.
You must select exclude as the initial value to exclude the special timestamp column from INSERT or UPDATE statements.
For instructions, see the User’s Guide.
The following CREATE TABLE statement defines an ASA table named timesheet containing three columns: employee_ID (integer datatype), hours (decimal datatype), and timestamp (timestamp datatype and timestamp default value):
CREATE TABLE timesheet (
employee_ID INTEGER,
hours DECIMAL,
timestamp TIMESTAMP default timestamp )
If you want to change the default behavior, you can specify that PowerBuilder not treat ASA columns named timestamp as Transact-SQL special timestamp columns.
To specify that PowerBuilder not treat columns named timestamp as a Transact-SQL special timestamp column:
Edit the Sybase Adaptive Server Anywhere section of the
PBODB105 initialization file to change the value of SQLSrvrTSName
from 'Yes'
to 'No'
.
After making changes in the initialization file, you must reconnect to the database to have them take effect. See Appendix A, “Adding Functions to the PBODB105 Initialization File.”