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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Linkage Service Recommended ?

Status
Not open for further replies.

power97

Programmer
Sep 17, 2003
67
CA
Hi,
I am wondering if I should use the PFC Linkage service or not. I have it setup and working but when I view the SQL it is generating it appears that it retrieves all the rows and then filters based on the key values. I assume this is the standard behaviour for the linkage service.
However, I am wondering if I should instead modify the selects of all the detail dws to dynamically include a where clause with the key value ?

Thanks In Advance


 
Although this is an old thread, I am responding anyway... Hopefully some discussion and knowledge can be gained (by me).

I must preface this by first saying that I have been programming PowerBuilder for around 8 years - almost never with the PFC. I am however currently using the pfc on a client project.

My answer would be - NO. If your dataset is large, you could possibly be bringing many more records than actually needed back to the window. I think the time and resources used would override any slight coding advantage you may get.

With that said, I would appreciate hearing other opinions. My general opinion of the PFC (and other language tools that seek to lessen the burden on programmers) is that they result mostly in bloated software, relatively poor programmers, and the savings gained are minimal.

Many will argue that it is easy for your developers to pick up and modify your applications - if we all use the same framework. My response would be (1) as an experienced programmer, I can pick up any corporate framework fairly fast as it is and (2) PowerBuilder is a very strong and rich language, and programming it is like taking a trip from Florida to California... There are so many ways to get there and one is not necessarily better than another, the advantage of having everyone go different ways is that we will all learn something new during the trip. Each time I go to a new client, I learn something new about PowerBuilder's capabilities because the client is not using the framework as everyone else I visited did.

 
One reason you might want everyone to use the same route from Florida to California is that once you (the contractor) are gone, someone else can easily re-trace the route and figure out what was done.

As far as the bloat issue is concerned although the PFC increases the number of files you distribute in an application it generally does not slow down execution (depending on which services you use and how the application is architected). Bad coders will write bad code regardless of any framework (or lack thereof) in use.

In short, it depends on what your situation is.

My .02
 
This is an old thread but I'll reply anyway.
Isn't PFC's linkage service have 3 customizeable method to link 2 datawindows. They are "SCROLL", "RETRIEVE", "FILTER"
I assume you might use the filter method instead of retrieve.

You can set this using
Code:
.
dw_detail.inv_linkage.of_SetStyle(2)
.

Using the retrieve method, you need to modify the dw_detail datastore object to accept retrieval argument defined in detailkey of
Code:
of_Register("masterkey","detailkey")

But I didn't check the actual SQL query that were sent.
So, CMIIW.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top