Solved

Turn off warnings vfp

Posted on 2011-09-04
5
1,278 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 41

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

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…
Find out what the Office 365 disclaimer function is, why you would use it and its limited ability to create Office 365 signatures.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

747 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now