CodeCharge Studio
search Register Login  

Web Reports

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

YesSoftware Forums -> CodeCharge Studio -> ASP

 [RESOLVED] Run CCDLookup outside a form?

Print topic Send  topic

Author Message
Chris__T


Posts: 339
Posted: 02/11/2009, 11:08 AM

I'm trying to run a CCDLOOKUP function on a blank page. Basically it's a temp page that will redirect to a different page based on what the function pulls up.

For example. On my main page there is a search field with button. Entering a Permit Number and pressing the button will send it to a Temp page with this url:

http://myserver/temp.asp?s_job_site-19878

I want to take that s_job_site number (via CCGetFromGet) and stick it in a ccdlookup to pull up the Permit_ID based off of the 19878 permit number:

temp = CCDLookup("Permit_ID", "permit", "Permit_No=" &_ DBMYSQL5_1PERMIT.ToSQL(CCGetFromGet("s_Job_Site",0), ccsInteger), DBMYSQL5_1PERMIT)

that should basically run a SELECT statement: SELECT Permit_ID FROM permit WHERE Permit_No=19878

Then finally it would stick what is in the temp variable and put it in a new url that is redirected:
Response.Redirect("http://myserver/main.asp?Permit_ID=" & temp)

But it's not working. I've added some error checking code and it will pull the number from the URL, but it won't go past the CCDLookup code.

Since I'm not doing this with any forms on the page (blank page and running in the before show event), does it have to run in a form for it to work?
View profile  Send private message
Chris__T


Posts: 339
Posted: 02/11/2009, 12:27 PM

Figured it out. I did need a form on the page for it to work. I stuck a small grid form and in its "before show" event, stuck my code in there and it worked. Also a slight modification to the url redirect code:

  
Response.Redirect("http://myserver/main.asp?Permit_ID=" & temp & "")  
View profile  Send private message

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.

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.