When you update data in the Form painter, InfoMaker builds a SQL UPDATE statement in the background. The Date parameter determines how InfoMaker specifies a date datatype when it builds the SQL UPDATE statement.
JDB JDBC
ODBC
O84 Oracle 8.x and Oracle8i
O90 Oracle9i
O10 Oracle 10g
The syntax you use to specify the Date 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 date 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.
Date=' \''date_format\'' '
Oracle syntax InfoMaker parses each set of four consecutive single quotes (''''
)
as a single quote when it builds the SQL UPDATE statement.
Date=' ''''date_format'''' '
The default value for Date depends on the DBMS you are accessing, as summarized in the following table:
DBMS |
Date default value |
---|---|
JDBC |
If no value is specified for the Date database parameter, InfoMaker looks for a date format in the section for your JDBC driver in the registry. If no date format is found in the registry, InfoMaker uses the JDBC date format escape sequence. |
ODBC |
If no value is specified for the Date database parameter, InfoMaker looks for a date format in the section for your ODBC driver in the PBODB110 initialization file. If no date format is found in the initialization file, InfoMaker uses the ODBC date format escape sequence. |
Oracle |
The default Oracle date format. For information, see your Oracle documentation. |
Assume you are updating a table named Employee by setting the Startdate column to 2006-04-23. This date is represented by the following date format:
yyyy-mm-dd
To specify that InfoMaker should use this format for the date datatype when it builds the SQL UPDATE statement, type the following in the Date Format box on the Syntax page in the Database Profile Setup dialog box:
yyyy-mm-dd
What happens InfoMaker builds the following SQL UPDATE statement to update the table:
UPDATE EMPLOYEE
SET STARTDATE = '2006-04-23'
Example 2 (Oracle syntax) To specify that InfoMaker should use this format for the date datatype when it builds the SQL UPDATE statement, type the following in the Date format box on the Syntax page in the Database Profile Setup dialog box:
yyyy-mm-dd
What happens InfoMaker builds the following SQL UPDATE statement to update the table:
UPDATE EMPLOYEE
SET STARTDATE = '2006-04-23'