CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> .NET

 Showing no Records.

Print topic Send  topic

Author Message
mr_medhat

Posts: 16
Posted: 07/11/2006, 3:30 AM

This ASP code works fine for showing no records in a grid if no search parameters were given :

if (FormName.command.Where = "") then
Form.command.Where = "FieldName = impossible_value"
end if


What is its equivalent code for .NET , VB !!


Thanks in advance


View profile  Send private message
Stan
Posted: 07/12/2006, 1:30 AM

You can add in the Query Bilder where parameter with logical operation "Or". And this parameter should always return false. For example 1=2. In such case, when some prameters will be passed, this expression will be ignored. But in case of missing parameters, it will not return records. It is the same trick, which you use for ASP, but without custom code.
mr_medhat

Posts: 16
Posted: 07/14/2006, 6:08 AM

Thanks Stan , That sounds smart , I'll try it right away .
View profile  Send private message
WKempees
Posted: 07/14/2006, 9:22 AM

Also it should be possible to set the default value of your already existing
Where, in VQB, to a non-existing value.
For instance if the search field is a positive numeric, then in the Where
Parameter Dialogue you can enter -1 as a default value, any value that is
not in the database.

This (normal behaviour) should prevent your empty where being ignored.

Walter


Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.