Solved

Turn off warnings vfp

Posted on 2011-09-04
5
1,348 Views
Last Modified: 2012-05-12
Hi:
Please excuse a stupid question:
When running a vfp database and a query overwrites an existing table,a warning appears that the table exists. I am happy with that.
When I compile the executable on vfp at work, and that executable overwrites an existing table, I get no warning. This is good.
When I compile the same executable at home , same version of vfp, I do get a warning. This is bad.
I have looked through the options in vfp, and the config.fpw file, but can find nothing that points out what I need to set at home to get rid of the warnings.
Can anybody help with a simple but irritating little problem? Thanks!
0
Comment
Question by:ClaytonGlass
  • 2
  • 2
5 Comments
 
LVL 16

Expert Comment

by:Kalpesh Chhatrala
ID: 36482655
you can add line like below in your application startup.

IF application.StartMode = 4  && This Line Check Application Running as EXE or not ?
        SET SAFETY OFF  && This Line Turn off Overwrite Warning
endif
0
 
LVL 16

Accepted Solution

by:
Kalpesh Chhatrala earned 50 total points
ID: 36482664
you can add line like below in your application startup.

IF application.StartMode = 4  && This Line Check Application Running as EXE or not ?
        SET SAFETY OFF  && This Line Turn off Overwrite Warning
else
      SET SAFETY ON  && This Line Turn On Overwrite Warning
endif
0
 

Author Closing Comment

by:ClaytonGlass
ID: 36482730
Thank You very much!
0
 
LVL 42

Expert Comment

by:pcelba
ID: 36483230
Just two notes: Application is an OLE object and Application.StartMode will do the job but VERSION(2) is much simpler.

The SAFETY setting for default Data session is stored in Windows Registry and you may set it in VFP IDE: Tools - Options - General - Confirm file replacement.

The default value of SAFETY setting for Private Data session is always ON.
0
 

Author Comment

by:ClaytonGlass
ID: 36483255
Thank you - again - pcelba!
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
The business world is becoming increasingly integrated with tech. It’s not just for a select few anymore — but what about if you have a small business? It may be easier than you think to integrate technology into your small business, and it’s likely…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question