Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Expression in View Designer
Message
From
19/03/1999 09:06:19
 
 
To
18/03/1999 13:59:24
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00198971
Message ID:
00199688
Views:
15
Hello Erik -

I apologize for asking so many questions about this one topic, but if I don't ask questions, my chances of completing this form successfully are slim!

Last night I worked on the SQL statement and modified it in the command window, then overwrote the existing SQL. I "think" I was successful, but I want to make sure. After I completed the SQL statement and "browsed" the view, a form popped up that asked me for a parameter, and didn't show me the records in my orders detail table as it had before.

So, I wanted to show you my WHERE statment in my SQL statment to make sure everything was ok.

I understood your SQL statement, minus the last part.

You wrote:
SELECT*
FROM Child table
WHERE Child table.pk = ?lnParentID

So, I went in and changed the SQL statement for my view to:
WHERE ordersdetail.norderid = ?orders.norderid

Quick background:
Orders is primary table
ordersdetail and products tables were used to create my view, which is called exxtended_price_detail

Orders table is linked to ordersdetail (norderid) in a one to many relationship
orders detail is linked to products (nproductid) in a one to many relationship


My question is> Is ?orders.norderid what you were referring to in your lnParentID?

That was the part I was a little confused. The reason being, later in your post, you stated that wherever there are changes in the parent record, to issue the following changes:

lnParentID = ParentTable.pk
REQUERY(extended_price_detail)
THISFORM.extended_price_detail.Refresh()


If this is the case, lnParentID = ParentTable.pk would be:

orders.nordeid = orders.norderid

*** Point being, I just want to make sure I am passing the correct parameter in the WHERE statement.

Last night I read in my programmers guide book that in a scenario where a list box and grid are being set up in a one to many relationship, you need to set up a parameterized view. It said to throw a variable into the selection criterion, so that it read, ?m.Cust_id (at least that is what it used in the example).

I noticed it threw in that ?m.

I was just wondering if that is what you meant with ?lnParentID, that I needed to throw in a variable?

Do I have things set up correctly, or am I missing the boat?

Thanks for your time Erik, I truly appreciate it.

Jason
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform