Data Access Worldwide Knowledge Base
Article ID 2090 Article Title ERROR: "Invalid symbol in expression" when I place a dblist on a view Article URL http://www.dataaccess.com/kbasepublic/kbprint.asp?ArticleID=2090 KBase Category VDF10 Date Created 02/25/2005 Last Edit Date 03/01/2005
Article Text
QUESTION:
When I create only a dbList object on a dbView and the first column of this list is a numeric column I always get the error "Invalid symbol in expression FILE". Can't the dbList handle a numeric first column?
ANSWER:
There is no problem with the dbList regarding a first column being numeric. For example, look at the selectionlist object for customer in the order entry example.
So what's wrong here?
The default behavior of dbList is usage as selectionlist and thus are all properties initialized for usage as selectionlist. The main controlling property for this is the move_value_out_state. If this property is set to TRUE (which is the default) the value of the invoking object is taken on init. Since the view is started from the menu the first menu item (usually labled 'File') is taken and this does not really convert to a numeric value, therefore you get the invalid symbol in expression error.
If you then double click an item in this dbList in the dbView, the move_value_out_state property tells the system to close the view and place the selected value (perhaps customer number 105) at the place where 'File' came from.
So what to do?
If the dbList is used in a dbView (instead of dbModalPanel) you have to set the property move_value_out_state (via the properties dialog in the Studio) to false.
You probably also want to look at the property auto_index_state. Set this property to false if the dbList shows data from a child constrained table and pick the right index for the ordering property of the dbList. The right index is the best index for the relational constraint. If you don't do this, the list can give dramatically bad results since too many records are searched through.
Contributed By:
Vincent Oorsprong
Company: Data Access Worldwide
email: vincent.oorsprong@dataaccess.eu
Web Site: http://www.dataaccess.eu
Email this Article
Email this Article to a Colleague
Send Feedback on this Article to Data Access Worldwide
Copyright ©2010 Data Access Corporation. All rights reserved.
The information provided in the Data Access Technical Knowledge Base is provided "as is" without warranty of any kind. Data Access Corporation disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. In no event shall Data Access Corporation or its suppliers be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages, even if Data Access Corporation or its suppliers have been advised of the possibility of such damages. Some states do not allow the exclusion or limitation of liability for consequential or incidental damages so the foregoing limitation may not apply.