DateTimeAllowed database parameter
Description
For those interfaces that support it, DateTimeAllowed controls
whether columns having a DateTime datatype can appear as unique
key columns in the WHERE clause of a SQL UPDATE or DELETE statement. PowerBuilder generates
an UPDATE statement or a DELETE statement
followed by an INSERT statement to update the
database from a DataWindow object.
When you are working in the DataWindow painter, you specify
which columns to include in the WHERE clause
by selecting them from the Unique Key Columns list in the Specify
Update Properties dialog box.
By default, DateTimeAllowed is set to 0 to prohibit DateTime
columns from displaying in the Unique Key Columns list and consequently
from appearing in the WHERE clause of an UPDATE or DELETE statement.
When you set DateTimeAllowed to 1, any DateTime columns in your
database table display in the Unique Key Columns list and can be
selected to appear in the WHERE clause of an UPDATE or DELETE statement.
When to specify DateTimeAllowed
You must specify a value for DateTimeAllowed before connecting
to the database.
Controls
-
ASE, SYC Sybase Adaptive
Server Enterprise -
DIR Sybase DirectConnect
-
I10 Informix
-
IN9 Informix
Syntax
|
1 |
DateTimeAllowed=<span>value</span> |
|
Parameter |
Description |
|---|---|
|
value |
Specifies whether you can use DateTime
|
Default
DateTimeAllowed=0
Usage
When to set
To allow the use of DateTime columns as unique key columns
in the WHERE clause of an UPDATE or DELETE statement
when you are updating the database from a DataWindow object, set DateTimeAllowed
to 1.
For instructions on using the Specify Update
Properties dialog box to specify update characteristics for a DataWindow object,
see the chapter on controlling updates in the Users Guide.
What happens when you save the DataWindow object
When you set DateTimeAllowed to 1, select a DateTime column
to appear in the WHERE clause, and then save
the DataWindow object, this column continues to display in the Unique Key
Columns list even if you set DateTimeAllowed to 0 on a subsequent
connection.
Examples
To allow the use of DateTime columns in the WHERE clause
of an UPDATE or DELETE statement:
-
Database profile
Select the DateTime Datatype Allowed check box on the Syntax
page in the Database Profile Setup dialog box. -
Application
Type the following in code:
1SQLCA.DbParameter="DateTimeAllowed=1"