Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pdox9 Locate record (Key = 3 fields) with tCursor match all 3 fields

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I am working with tables ref. integrity 4 tables deep.
QuoteMst, QuoteItem, QuotePriceSteps & QuoteItemDetail.
Table relationships are 1 to many to many to many. If I am updating QuoteItem (key=1,2,1000) and try to locate QuotePriceSteps (Key=1,2,1000) but paradox displays QuotePriceSteps (Key=1,1,1). How do I locate and display QuotePriceSteps (Key=1,2,1000)?
I am desperate!!!
 
Let me see if I understand....Is the first table in your DM the QuoteMst table or the QuoteItem? If you are trying to get Pdox to display info in the "Third" table based off the "Second" table in the relationship, ignoring the Master table ("First"), you may have trouble. You may need to set up a Query linking all necessary fields with example elements. Are you Programming in ObjectPal?? If so, you can paste the query in your source code , get the user data and use the Tilde (~) operator to use the data in your queries at runtime. I do this all the time. It takes more steps but it works! Hope this helps.
CB [sig][/sig]
 
All 4 tables are in the data model for the form. Can a tCursor locate with tree fields as the key?
 
A tcursor can only attach to a single table at a time. If I understand what you want, I think you need to attach separate tcursors to each table and use something like:
(working from memory, so syntax may be wrong)

if tMst.locate("MstKeyField", 1) and tItem.locate("ItemKeyField", 2) and tStep.locate("StepKeyField", 1000) then
QuoteMst.reSync(tMst)
QuoteItem.reSync(tItem)
QuotePriceSteps.reSync(tStep)
endif

BTW, I'd get rid of the RI and replace functionality via code before you get bitten badly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top