Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameterized view for no parameter?
Message
From
18/02/2004 17:12:05
 
 
To
18/02/2004 17:09:33
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00877929
Message ID:
00878529
Views:
23
Hi,

I would only like to point out one thing. Sending "" to a parameterized view will pull all records in VFP as stated below. But if you upsize that view to SQL Server you will not get any records. At least that has been my experience so far.

Greg

>>Hi, Chris-
>>
>>>However, I think I didn't ask the question I wanted to. I guess I should have asked how to have parameters were sometimes optional. EG: So the same form or report works whether it's for selected customers or all of them.
>>
>>Ah. Well, I will included a parameter in a form Init() that is the ID of, say, the customer I want to have come up on the Customers form. So, you could check if the parameter has been passed--VARTYPE(tnID)="N"--and if it is then change your DataEnvironment to use the lv_Customer view, and if it's not set the DE to use the lv_Customers view. (Just for example).
>
>The forms in question are asking the user for the value, not receiving it as a passed parameter. Verifying passed parameters is pretty easy, but the forms aren't receiving it, they're asking the users for it before requerying the view. I really want to avoid that kind of conditional logic if I can.
>
>With "SELECT * FROM customer WHERE customer.lastname = ?vp_lastname", it's easy enough to pass "" as the parameter and get all customers, but what about a date(customer.lastdate) or integer(customer.custid)?
>
>>I also noticed you had another question in your original post about view parameters based on a field in another cursor:
>
>Then this will be a no brainer once I get the first half right. Cool.
>
>Chris.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform