Time

Description

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

Applies to

Syntax

The syntax you use to specify the Time parameter differs slightly depending on the database.

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

JDBC and ODBC syntax InfoMaker parses the backslash followed by two single quotes (\'') as a single quote when it builds the SQL UPDATE statement:

Time=' \''time_format\'' '

Oracle syntax InfoMaker parses each set of four consecutive single quotes ('''') as a single quote when it builds the SQL UPDATE statement:

Time=' ''''time_format'''' '

Parameter

Description

' \''

' ''''

JDBC and ODBC syntax 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.

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

time_format

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

For more on display formats, see the Users Guide.

\'' '

'''' '

JDBC and ODBC syntax 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.

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

Default

The default value for Time depends on the DBMS you are accessing:

DBMS

Date default value

JDBC

If no value is specified for the Time parameter, InfoMaker looks for a time format in the section for your JDBC driver in the registry. If no time format is found in the registry, InfoMaker uses the JDBC time format escape sequence.

ODBC

If no value is specified for the Time parameter, InfoMaker looks for a time format in the section for your ODBC driver in the PBODB125 initialization file. If no time format is found in the PBODB125 initialization file, InfoMaker uses the ODBC time format escape sequence.

Oracle

The default Oracle date format.

For information, see your Oracle documentation.

Examples

About these examples

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

hh:mm

Example 1 (JDBC and ODBC syntax)

To specify that InfoMaker should use this format for the time datatype when it builds the SQL UPDATE statement, type hh:mm in the Time Format box on the Syntax page in the Database Profile Setup dialog box.

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

UPDATE WORKHOURS

SET START = '08:30'

Example 2 (Oracle syntax)

To specify that InfoMaker should use this format for the time datatype when it builds the SQL UPDATE statement, type hh:mm in the Time Format box on the Syntax page in the Database Profile Setup dialog box.

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

UPDATE WORKHOURS

SET START = '08:30'

See also