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!

Is there a way to get VFP to index a record...

Status
Not open for further replies.

GriffMG

Programmer
Mar 4, 2002
6,333
FR
I should really know this, but I can't remember!

I have an index where part of the expression actually does a look-up
in another table and I want to force an index update should that table be
altered... is there an Indexrecord() fuction?

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Where do you store the data that your users enter?

What about for editing? How do you make the existing record available in the controls?

Tamar
 
Are you being serious?

Code:
thisform.myeditbox.value = mytable.myfield


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Code:
thisform.myeditbox.controlsource = "mytable.myfield"

This way you will also see the value and be able to edit it. And this is no one way, editing will modify mytable.myfield without REPLACE, UPDATE or GATHER. Without buffering you even have no code at all, and with buffering you gain control about concurrent changes and handling it, tableupdate() to save and tablerevert() to cancel out.

Bye, Olaf.
 
I can see I'm just a luddite.

I live in an @ say get world...

B-)



Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
I have to say I'm on Griff's side of the fence.... I started the applications I have developed, sold, and still support starting with 2.6.... they are now distributed in VFP8 and I went thru the required re-write of the code when they were converted to VFP6. I understand what the table buffering function does and haven't found the need to change any of my un-buffered code to be buffered. I have seen it used in the Sage accounting software which I also support and the benefit I see in it there is the 'transaction' processing where a transaction involved updating many different tables and needs to be rolled back in the event of a problem during the update.

When creating a new form I don't used the data session ... I prefer to only have tables open when they need to be so they aren't vulnerable to corruption should there be a power interruption (natural or human)... this also makes your data access methods ready for SQL server back end implementation.....

Just a few thoughts from another dinosaur... (starting programming in 1979)

Andy Snyder
SnyAc Software Services Hyperware Inc. a division of AmTech Software
 
I do use datasessions... I have to 'purge' them before compilation, but I do use them.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
Well, after all it's your decision what you feel comfortable with, we're not on a trial here, just advertising the benefits.
Buffering also is no reason you can't change to SQL Server, with old style SPT or Cursoradpaters or remote views you always end with VFP cursors and can use their buffers and TABLEUPDATE() to update the remote data, it's not a feature of DBFs, it's a feature of workareas, and so it continues to work, when you change your RDBMS.

What doesn't work well when converting to Client Server Databases is USING tables instead of loading data with queries, that's the main culprit of not being able to convert easily, not buffering.

Bye, Olaf.
 
Andy said:
I have to say I'm on Griff's side of the fence

In a way, I'm quite pleased to see that. I'm sure Griff wouldn't have felt we were ganging up on him, but even so ....

Talking of dinosaurs, I'm probably the only person you know who doesn't carry a mobile phone. I don't even have a Facebook page, and I have never twitted (if that's the word) in my life.

But I always use buffering in my VFP apps.

Mike



__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
I certainly never felt ganged up on Mike, I know that everyone here wants the same things - and it's good that we all work in different ways, that's part of the beauty of coding!

I do have a mobile, but never facebooked or tweeted - cannot see the point.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.
 
It must be nice to not be required as part of the job to carry a cell phone, but on the other hand with all the apps I use on mine (remote access when problems arise, starting my truck in hot or cold weather, google maps and sky, even a flashlight!), suffice it to say I am one of those people who now think it would be way too inconvenient to get along without one. Facebook is great for 'talking' with old friends, but I have never seen the need to twit. That seems even more of a 'short attention span' gadget for attention whores.

Aaaaanyway, I still have an @ SAY/GET app written in Fox 2.x, as well as a bunch in VFP. But I have yet to use buffering either. So don't feel too alone. [bigsmile]


-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Talking of dinosaurs, I'm probably the only person you know who doesn't carry a mobile phone. I don't even have a Facebook page, and I have never twitted (if that's the word) in my life.

Well Mike, you are not totally alone - although our numbers do seem to be VERY FEW!

I put a HIGH PRIORITY on Solitude time when I do NOT ALLOW INTERRUPTIONS.
That's some of my best QUALITY time - climbing the peaks, riding my Mountain bike, doing Adventure Races, diving the lakes, designing new applications, thinking through the resolution of code problems or just solving all of the world's problems in general.

Therefore while I do have day/time ranges in which I MAY be contacted, I do not carry a mobile phone either so that people would be able to contact me 24/7 whether I want them to or not.

So I guess us Dinosaurs will just eventually slip into obscurity some day.
But until then - WE ROCK !!!!!

With enough time and experience under their belts, those other young whipper-snappers will eventually learn.

JRB-Bldr
 
Mike, you're really not alone, I also don't have a mobile.

I once had, far before they became smartphones. I also skipped most any social media account but G+, which is my contact to a group of developers I monthly meet, and you get some other contacts. I once started writing a twitter API, but since I don't use twitter anymore that's also discontinued.

I also don't have a car, living in city with a good public transportation system I only miss it once a year or less, when having to transport something larger or heavier. You also don't get much faster anywhere, only if you have bad luck with the time tables.

I have two iPods, a classic one with 160GB hdd to carry my music with me and an iPod Touch I bought to check out the buzz about the apps. They are nice to use, but I don't miss anything. I haven't used my iPod Touch for quite some time now.

I remember my appointments, I don't store them in a calendar, I partly use the outlook calender, but I just don't make appointments too early - and I don't have that many of them anyway. If you start swapping out your data externally, you will depend on that. I don't let that happen.

And I don't use a real flashligh or compass or water level or whatever, so I wouldn't have a use for that as an app, too. I phone in the office or at home. I sometimes would better be reachable by customers, but it turns out it never really is that urgent anyway. I inform myself from tv news, of which one is the most serious anyway and I use the internet to inform myself before buying something, I seldom do spontaneous buying, surely not of things you want to be informed of before buying.

Yes, I'm also already a dinosaur compared to younger people, that's quite normal, even at the age of 43.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top