Time

Description

When you update data in the DataWindow painter, PocketBuilder builds a SQL UPDATE statement in the background. The Time DBParm parameter determines how PocketBuilder specifies a time datatype when it builds the SQL UPDATE statement.

Applies to

Syntax

The Database Profile Setup dialog box inserts special characters (quotes and backslashes) where needed, so you can specify just the time format.

In a PocketBuilder application script, you must use the following syntax. PocketBuilder parses the backslash followed by two single quotes (\'') as a single quote when it builds the SQL UPDATE statement:

Time = ' \''time_format\'' '

Parameter

Description

' \''

Type a single quote, followed by one space, followed by a backslash, followed by two single quotes. There is no space between the two single quotes and the beginning of the time format.

time_format

The time format you want PocketBuilder to use when it builds a SQL UPDATE statement to update a data source in the DataWindow painter.

For more on display formats, see the Users Guide.

\'' '

Type a backslash, followed by two single quotes, followed by one space, followed by a single quote. There is no space between the end of the time format and the backslash.

Default

If no value is specified for the Time DBParm parameter, PocketBuilder looks for a time format in the section for your ODBC driver in the pkodb25 initialization file. If it finds no time format in the pkodb25 initialization file, PocketBuilder uses the ODBC time format escape sequence.

Examples

Example 1

Assume you are updating a table named Workhours by setting the Start column to 08:30. This time is represented by the following PocketBuilder time format:

hh:mm

To specify that PocketBuilder should use this format for the time datatype when it builds the SQL UPDATE statement:

What happens PocketBuilder builds the following SQL UPDATE statement to update the table:

UPDATE WORKHOURS
SET START = '08:30'

See also