limiting records read based on selection criteria

Questions and answers regarding general SQL and backend databases

limiting records read based on selection criteria

Postby rfleming » Sat Mar 13, 2004 8:23 pm

What is the best way to limit which records a form displays based on sql where clause?
rfleming
 
Posts: 26
Joined: Tue Feb 10, 2004 12:27 am

Postby jcompagner » Sun Mar 14, 2004 10:31 pm

please explain.. What do you mean with limit?
Limit the maximum records that are shown?
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

sql select

Postby rfleming » Tue Mar 16, 2004 1:10 am

ideally i want to pass an asp session variable into the sql select statement so that i can only select records which match the variable - please explain how to pass in the variable.
rfleming
 
Posts: 26
Joined: Tue Feb 10, 2004 12:27 am

Re: limiting records read based on selection criteria

Postby bcusick » Tue Mar 16, 2004 6:00 pm

rfleming wrote:What is the best way to limit which records a form displays based on sql where clause?


You can use controller.addFilterParam - this will allow you to automatically add to the "where" clause of the query that displays records. NOTE: Once you add a filter param, you can't "take it off" again - until you re-open the solution.

Hope this helps,

Bob Cusick
bcusick
 
Posts: 1255
Joined: Wed Apr 23, 2003 11:27 pm
Location: Thousand Oaks, CA USA

Postby jcompagner » Tue Mar 16, 2004 6:03 pm

first: getting a asp session variable (that the browser get's??) is as far as i know not possible right now. Because if you don't look at the first time install of servoy. (going to a webpage..) but from that time on (so starting servoy from a desktop shortcut) What asp session variable do you have??

But to limit the records shown in a foundset can be done by implementing youre own searches for that form. Or setting foundsetFilterParams with the onload of that form. (xxx=sessionvar)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8833
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet


Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 24 guests

cron