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

how to copy foxuser.dbf environment setting to new application?

Status
Not open for further replies.

indarto

Programmer
May 12, 2002
5
ID
how to copy foxuser.dbf environment setting to new application? normally when we use more than one application, the 2nd, 3rd etc application won't use environment we like to use but they will use foxpro default = original environment setting.
 
If this is a new application that you are distributing, then you merely need to include the "good" FOXUSER.DBF & FPT files with it.

If this is a new in-house application that you are launching, you might want to have all of your FoxPro applications point to a single FOXUSER. To do that you would need to point the application to it either via:

1. the CONFIG.FPW file RESOURCE= command

2. or within the application itself with
SET RESOURCE OFF
SET RESOURCE TO <path+your FOXUSER>
SET RESOURCE ON

Good Luck,
jrbbldr
jrbbldr@yahoo.com
 
I've had good luck with this routine:
I get my FOXUSER file just the way I want in development. Make a copy under the new name MASTUSER. Delete all the records except the ones that pertain to this application. Include MASTUSER in the standalone executable (which makes the file READ-ONLY). Put this routine in the application's MAIN module:
Code:
SET SAFETY OFF
COPY FILE mastuser.dbf TO thisuser.dbf
COPY FILE mastuser.fpt TO thisuser.fpt
SET SAFETY ON
SET RESOURCE TO thisuser
Every time the application boots, it starts with a nice clean resource file, just the way I set it up, even if the users have muddled up the previously used one.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top