telmiger
Posts: 61
|
Posted: 05/17/2004, 11:12 AM |
|
I created a grid and search form with the grid builder.
Everything works OK. If none of the search criteria is entered all records show up in the grid.
To add some more functionality I converted the datasource of the grid from table to SQL, but did not add any custom SQL
The problem that I encounter now is that no records show up if no search criteria is selected. (Some of the search criteria are of integer values.)
I belief the difference is that in the Where clause of the table design you do not have to enter any default values in the parameter source.
In the custom SQL you have to enter a default value if the parameter is an integer type.
Is there a workaround for this?
Tony Elmiger
|
|
|
peterr
Posts: 5971
|
Posted: 05/17/2004, 12:16 PM |
|
When using the Table datasource CCS has full control of the generated code and the program dynamically modifies the SQL based on the returned parameters. For example if no parameter is present then the whole WHERE statement can be removed.
However when you decide to use own SQL then CCS assumes that this is what you want to use and we cannot remove or modify your own WHERE clause. In such case you will need to create a WHERE clause that can handle every situation, including non-existent parameter values. It is true that some paramater defaults may be needed in such case as well.
See related topic at http://forums.codecharge.com/posts.php?post_id=27344
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
|