FIX: Running a Query from View Designer Causes Error MessageID: Q142201 The information in this article applies to:
SYMPTOMSUsing the Run Query option from the View Designer when modifying a previously created view results in a dialog box reporting "CTOD is not a recognized built in function name" for Remote Views and "Function argument value, type, or count is invalid" for Local Views. This only occurs for views using parameter values where one of the parameter values is compared to a date field and is followed by another selection criteria.
CAUSEThe View Designer wraps the CTOD() function around the parameter value used against the date field, when the view definition is read in.
WORKAROUNDRearrange the selection criteria so that the date field comparison is the last line.
STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in version 3.0b.
MORE INFORMATIONSteps to Reproduce Problem
Remote View Example1. Use the ODBC Administrator to Create a Data Source to the SQL Server 2. Create a test database, and then create a connection to the SQL Data
3. Create a new remote view, choose the newly created connection, and then
4. Create a new parameter (param1) with the datetime data type.
5. For the selection criteria use the following:
6. Run the query and type 01/01/94 for the parameter. Two records should be
7. Save the query, modify it again, and then run it again. The following
Local View Example1. Open the Vfp\Samples\Data\Testdata.dbc database. 2. Create a new local view based on the Employee table. 3. Select all the fields for output. 4. Create a new parameter (param1) and give it a date data type. 5. For the selection criteria use the following:
6. Run the query and type 01/01/60 for the parameter. Two records should
7. Save the query, modify it, and then run it again. The following error is
|
Last Reviewed: November 8, 1997 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |