CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> Archive -> GotoCode Archive

 how do I stop Sql from executing on Page Load

Print topic Send  topic

Author Message
mark
Posted: 09/28/2002, 8:22 AM

I have a search form that will query a large oracle database
It is trying to execute SQL on page load
Ken Hardwick
Posted: 09/28/2002, 10:21 AM

Using ASP, I do the following...

In the close event of the Search form...I have the following formula
for each search item...

if fldSearch = "" then
session("Search") = "XXXXXXXXXXXX"
else
session("Search") = fldSearch
end if


Then, I use the session variable as a "required" input parameter
in the grid. This way, you get an empty record set until a valid search
item is executed.

Another way, would be in the open event of the search form, modify the where statement...like
if getparam("Search") = "" then
sWhere = sWhere & " 1=2 "
end if



Ken Hardwick
Posted: 09/28/2002, 1:32 PM

Another way, would be in the open event of the "search" s/b "Grid" form, modify the where statement...like
if getparam("Search") = "" then
sWhere = sWhere & " 1=2 "
end if

   


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

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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