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

Unable to make user defined navigation buttons for RDBMS

Status
Not open for further replies.

Eliott

Programmer
Nov 8, 2009
91
BA
Based on the suggestion from the book: MySQL client server app with VFP I decided to deal with SQL-PT way instead to work with views. I know how to work basically with insert, delete, update records but I would like to make classic "file cards" forms with navigation buttons and other buttons like command buttonset (Add/Save, Edit/Cancel, Delete...) in VFP made by wizard. After month of write&try I gave up. I "googled" on Net for some of near solution but wasn't able to find anything useful. Do you guys have some information where is possible to see practical code that could be useful for this purpose?
Thank you.

There is no good nor evil, just decisions and consequences.
 
You cannot use the navigation buttons generated by the wizard, since the wizard generated code assumes you are dealing with a Foxpro table.
But what you could do is in the load of your form bring in the data into a cursor, and then your Next,Back,Top and bottom would at least work.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
ReFox XI (www.mcrgsoftware.com)
 
"VFP made by wizard"

Using the VFP Wizard tools seems like an easy way to accomplish a task. And for SIMPLE needs, it is OK. Unfortunately for somewhat more complex needs it, more often than not, just leads the developer into an operational 'box canyon'. The result works the way the Wizard wants you to work, not necessarily the way you want it to work.

Additionally using the Wizards doesn't go very far in teaching the developer how to actually develop VFP applications.

You would be much better off abandoning the Wizard approach all together. Rather than continuing to try to modify the Wizard's result you would be better to toss it out and write the code yourself.

We can only guess that your level of VFP experience.
Since you already know about using SQL-PassThrough, you might already have some VFP experience, but your use of the Wizards suggests that you might be relatively new to VFP.

If you should need some pointers there are a few good references out there.
Excellent VFP books:
Free On-line or Downloadable basic videos:

Good Luck,
JRB-Bldr
 
I don't think Eliott was saying he was trying to use the wizard, but rather than he wanted to create a form with navigation buttons like the wizard.

Eliott, if that's right, you would need to bring the entire table into a local VFP cursor, and go from there. Once you have the cursor, then you can do the SKIP and GO BOTTOM and all the other stuff that you can see in the wizard. You can work with the cursor just as if it was a table as far as this requirement is concerend.

However, doing that goes against the concept of client-server. The whole point of using a back-end database is to fetch only the data that you need for a specific task. Fetching entire tables could prove very slow. If you want to do a real client-server app, you need to do something other than your "file card" interface.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
HI Mike,
yes I thought just as you said, maybe I used improper words and mis leaded other users here to wrong direction. I'm not newbie at VFP9, just until now I sed DBF/DBC and now wanted to use MySQL in order to avoid limitation of DBF. Except that, I need access to data from the Web so I needed to use MySQL. I saw in mentioned book (first post) a toolbar with navigation and data manipulation buttons and thought that I could to make some form with similar idea and design. Using views is easy approach but except classic add record action I need sometime complexed SQL so only acceptable solution is SQL-PT. I thought that someone of you have had oportunity to see or make such system. I know for classic "filter form" that grab particular record and fill form for edit or delete or... but wanted to obtain more sophisticated look & feel. Thanks for inputs, I appreciate it.

There is no good nor evil, just decisions and consequences.
 
Mike,

I think it's bad advice to tell him to bring the entire table down.

Eliott,

When working with client/server, you need to rethink your application design compared to how Fox apps have been developed for years. You only work with a subset of data at a time, say all customers in New York. So, you provide a way for the user to enter the query, then bring down only the records they asked for. Navigation buttons then work on that subset of data.

Craig Berntson
MCSD, Visual FoxPro MVP,
 
Dear Mike and Craig,

I have understand your valuable inputs and thank you for your thoughts. I have alerady some design idea how to re-organize old fashioned concept of VFP-app development for RDBM, I hope it will work for me... as I can't imagine to read DBF table using PHP just in order to keep old manner of thinking.
Thanks to all.

There is no good nor evil, just decisions and consequences.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top