Solved

Turn off warnings vfp

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Close table 1 230
Controlling the ''Executing remote" message when using SQLEXEC() 5 149
Can't edit config.fpw in VFP9 5 102
How to run a script in foxpro 6 78
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…
Recently, Microsoft released a best-practice guide for securing Active Directory. It's a whopping 300+ pages long. Those of us tasked with securing our company’s databases and systems would, ideally, have time to devote to learning the ins and outs…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

730 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