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.
Applies to
ASE, SYC SAP Adaptive Server Enterprise
DIR SAP DirectConnect
I10 Informix
IN9 Informix
Syntax
1 |
DateTimeAllowed=value |
Parameter |
Description |
---|---|
value |
Specifies whether you can use DateTime columns as
|
Default value
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 Controlling Updates in DataWindow objects in 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.DBParm="DateTimeAllowed=1"