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?
|