Leemi
Tue May 18 13:32:42 CDT 2004
Hi:
As you know, it can be somewhat difficult to speculate why someone did one
thing or another. <s> However, I will offer a few ideas.
You use a table when you want to keep the data after you exit the program.
If you use a cursor to store the data, the data is lost when you exit the
app because the cursor resides in RAM. Other than that point, you can use a
table and a cursor interchangeably.
By the way, you said you don't see the tables listed in the project. In
VFP, a project does not have to contain any tables. I think this is a key
difference between VFP and Access. Correct me if I am wrong, but I think
all code and data needs to be in an Access project. Not so in VFP. You
need to search the hard drive for table files (DBF, FPT) to see if any
exist. I cannot imagine someone writing a VFP app that uses non tables,
but I guess it is possible.
They might be using unique index keys instead of primary index keys.
However, you are right in stating a primary key is a better option.
I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no rights.
Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell
*-- VFP8 HAS ARRIVED!! --*
Read about all the new features of VFP8 here:
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
Purchase VFP8 here:
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518
Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retires Sept. 30th, 2003
>I just took over at a new company that originally used dbase to build some
processes/reports
>and later converted it all into VFP 7.0. However, I noticed in looking at
the VFP projects, that no
>database files were used and therefore, there are no primary keys
established and/or
>relationships defined. In addition, there are no views used in any of the
projects since those are
>only supported when using a database file.
>Being a beginner to VFP and programming (8 years using Access only), can
anyone give me
>some thoughts on why you would use a database file and why you wouldn't??
To me, having
>primary keys is critical to data integrity so I'm not sure why they
weren't used. However, the old
>manager learned VFP from a book and didn't have a lot of dbase experience
so that would
>explain why. Is using a database file important and/or critical?? Thanks.