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

1529 Error and Alternate Data Sets

Status
Not open for further replies.

Headwinds

Programmer
Feb 6, 2001
38
0
0
US
I have a VFP7 application that is used by a church group to register attendees at conventions, record payments and meal preferences, print nametags, and so on. Last year, while it was still a VFP6 application the group started using it for registering attendees at several different kinds of meetings. They did this by copying the whole application into different locations.

In the latest round of enhancements, I've moved from VFP6 to 7, and so I'm now trying to let them have a single installation of the executable file, but provide choices at run time of which data set to use. That part seems to work fine. But the first time they open one of the old data sets, I want to check the file and table structures and--if the data set doesn't have the two new tables and two new columns in old tables that I added during the last enhancements--I want to add them (and update any views that use them).

When my code detects a missing table in the data set the user is trying to open and tries to ADD it, I get a 1529 error, telling me that the table I'm trying to add already exists in the main project data set. Indeed, whenever I open the database for an alternate data set, the data set of the main project opens automatically. Even if I don't have the project open and do it all in the Command Window (which keeps the data set registered in the project from opening), I still get the 1529 error. Why can't I add a table to data set 2 if the table already exists in data set 1?

Thanks for any light you can shed on this,

Headwinds
 
Got it. The problem appears to have been that the search path returned to the primary data set, found the .dbf file that I was trying to create, and objected to doing it again. To get around this, I temporarily reset DEFAULT to the location of the alternate data set, and that's where the new .dbf file gets created.

I'm still unsure why changing DEFAULT from
c:\mainapp to c:\altdata fixes this problem when the primary data set is in
c:\mailapp\data. I didn't have to reset the value of PATH.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top