Solved

Turn off warnings vfp

Posted on 2011-09-04
5
1,386 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

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…
Resolving an irritating Remote Desktop connection that stops your saved credentials from being used.
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

688 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