Suntower
Posts: 225
|
Posted: 12/14/2004, 11:55 AM |
|
ASP: This is so basic I =must= be missing something.
I have NOT heretofore programmed in ASP. Just learning. I -do- program in C so...
I have a page which has a listbox which pulls data from a table called costcenters. I need to limit the results to a particular CustomerID.
I want to assign a variable for a page -before- the SQL expression is generated and use that variable as a WHERE clause parameter. I have tried and tried to figure out how to:
1. Create a variable and assign it a value -before- the SQL expression is generated.
2. Get the SQL expression to actually limit the query to my parameter.
Any help would be MOST appreciated. What I always get back for results is the entire table.
This may be unrelated, but for some reason, in the form, the submit button is always hidden by default. Why?
TIA,
---JC
_________________
---On a campaign for more examples and better docs! |
|
|
peterr
Posts: 5971
|
Posted: 12/14/2004, 12:30 PM |
|
You can click on the [...] button in the "Data Source" property of your listbox, then specify the Where parameters there. You can find more information about the Data Source at http://docs.codecharge.com/studio/html/UserGuide/Forms/FormDataSource.html
In your case I'm not sure at what point you know the CustomerID, so there could be several ways to configure the Where parameter:
- use session variable
- use URL parameter
- use global variable
- use an expression
For example if you want to use URL parameter you would configure your Where Parameter with "Parameter Souce Type = URL".
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
|
|
paterns
|
Posted: 06/19/2005, 11:17 AM |
|
Ok, but how to use as global variable where gobal variable is definded ?
how to use property application parametar ?
|
|
|
|