Solved

Turn off warnings vfp

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Memo window in FoxPro 2 521
break table into files vfp 2 96
VFP9 options in the cloud (and elsewhere) 3 139
Need batch script to copy multiple files for Windows 4 64
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…
This article lists the top 5 free OST to PST Converter Tools. These tools save a lot of time for users when they want to convert OST to PST after their exchange server is no longer available or some other critical issue with exchange server or impor…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

914 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

13 Experts available now in Live!

Get 1:1 Help Now