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

Master/Detail Remote View Form Sample Needed

Status
Not open for further replies.

stanlyn

Programmer
Sep 3, 2003
945
US
Hi,

I have looked and so far have not been able to find a Master/Detail form that uses a remote view for both the parent and child tables. All samples I've seen suggests the parent not be a remote view due to the needed indexes required for the relation.

I'm trying to learn remote view programming now and I would like to adapt a best practice method for RAD development. Hopefully, the sample form shows how the data env is setup. Is the data env setup in code in load or via the gui? Where is the relation setup as it cannot be setup in the gui? What order are these setup? The sample form needs to do all crud operations, instead of only viewing.

Thanks,
Stanley
 
Hi Mike,

Mike said:
Every programmer re-discovering these elementary things is like multiple cavemen each inventing the wheel.

That is what happened to me when I first started, by getting vfp and playing with it until I got the results I was looking for, EXCEPT not RAD and using any views or business objects or cursor adapters.

I've spent countless hours over the last 10 years trying to use MSSQL as my backend. The only thing I have had any success with is SQL Pass thru, but is so far from RAD, I won't even consider using it anymore for a project.

I'm started over again with using remote views, as most of my vfp data skills can be used. I believe I'm thru most of the issues using them, except for forms that uses master & detail remote views. That is where I'm finding no samples that I can learn from, hence the plea for one.


Mike said:
Visual MaxFrame Professional

Is this the same Visual MaxFrame that Drew Speedie helped develop? If so, I own it, somewhere. Just found it and is VMP5 from Data Solutions. Build 20020417...
What kind of learning curve and is it worth learning?
How many people here using it?
Is it compatible with vfp9sp2 or vfpa?

Thanks, Stanley

vmp5_hdpwhj.jpg

 
 https://files.engineering.com/getfile.aspx?folder=e15995f1-b44f-47d6-ac89-bb19b1a56c07&file=vmp5.JPG
Hello,


we have master/detail in many programs, for example orders (master) where each orders have positions (detail)

The master is a remote view showing all (filtered) orders in grid1
In grid2 positions of the active order are shown. We do this with a cursor (can be a RV, too) which is updated in .init() of form and in .afterrowcolchange() of grid1
Because every position ha a foreign key (fk_order) which matches the primary key of the order ir belongs to (pk_order) its easy

hth
regards
tom

 
Hi Tom,

Tom said:
Because every position ha a foreign key (fk_order) which matches the primary key of the order ir belongs to (pk_order) its easy

Not sure what you mean here...

Talking only about remote views here....

I read that relations must have an order set, which implies an index. So how and where is this setuo? I know that I can get the remote view and create an index for the detail on the key used to link the two, then set order. Do I need to do all this manually? If all this has to be built out manually, then is there a best practice for RAD development. I can make this work by doing what I have done for years by throwing RAD out the window and
1. in the form's init, load the master remote view,
2. load empty detail view,
3. build index on foreign key
4. requery() detail once master record is in focus and we know what key to use
5. everytime the master row changes, reset the parameter and requery and that just for viewing
6. then a manual wireup of all the crud stuff is needed

I was hoping to find something as easy of creating a DBF master/detail form as can be easily done by the builder. It handles all crud stuff and only takes a minute to build out a fully function form (RAD) So how can that be done using remote views? Since this is pretty much a dead thread, I'm wondering if there is a fast way to create a master/detail form that takes care of the wireup for the crud actions. So far, there seems to be no quick and easy RAD way.

Do you know of any sample forms for this? I did find one named "many" in VFP samples, but not able to see how it works, such as changing properties and methods to fit my de.

Other questions would be A. would I use a data environment from the builder, or do it in the load event with an empty de. Doing so, I lose a lot of features, like dragging field onto the form of grid creation.

Thanks, Stanley

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top