Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to stop this showing on the screen ? 1

Status
Not open for further replies.

janak vyas

Technical User
Jun 3, 2020
47
IN
Annotation_2020-06-05_181049_itenym.png



Every time I compute something on my program I get prompted by this dialog box one thing I know is that it tells me that the code is not recognised/marked as a vfp code or am I wrong ?
And how do I stop this from showing EVERYTIME ! ( although just with an escape it gets removed, but there are times where it keeps on coming for about 3-6 times, one after the another )

Please help.
 
Are you not aware of what you should set or better not set?

VFP is capable to work on some legacy dBase DBFs, too, and also legacy Foxpro dbfs, so they stay in their format and work with their software still.

The moment you would set a codepage could mean you're not able to use this dbf with its original software at all, though, or at least it would see the wrong codepage. I wouldn't risc that side effects.

Take a look into SET NOCPTRAN or make a copy and convert the dbf every time you work on such a dbf with VFP, there's CPCONVERT() and there's CPZERO.prg

But if you want to be able to work on a non VFP dbf this comes down to the same principle as any other database: Find an ODBC driver (or, but much less likely an OLEDB provider) and act on this data via SQL Passthrough or other means of remote data access. Just because they somewhat pass through and can be worked on with VFP, you see they differ. DBF isn't DBF. There's also a chapter in the help about the different DBF types VFP can recognize at least.

Bye, Olaf.


Olaf Doschke Software Engineering
 

It seems to me a problem that the table cannot be opened.
Visual Fox tables are on page 1252.
If they are tables generated with DOS systems, they will surely be at 437.

There is a conversion program called Cpzero.prg.

* Remove the code page from MYFILE.DBF and specify 437 as the new code page.
*
DO Cpzero WITH 'MYFILE.DBF', 437

This program is in the Visual FoxPro folder.... Tools\Cpzero
The table must be closed (and not used by anyone) to run this program.

Now, if you try to open a dbf generated with a DOS (fox or clipper) from Visual Fox, it generally presents a dialog box to determine what code page the table is on. At no time does it say that it cannot be opened.

In Visual Fox, the CPDBF function ([nWorkArea | cTableAlias]) tells you which code page the table is on.
 
can you help me with providing any link to courses where I could learn vfp or any books you would recommend where I can learn the concepts with the basic knowledge I have.
It would be a great help.
 
Thank you Olaf and Avsalf for your help, would try this on some .dbf first and then would automate to convert every file in my program knowing everything is safe.
 
avsalf said:
a dialog box to determine what code page the table is on. At no time does it say that it cannot be opened.

Nobody was talking of a message saying a table can't be opened.

Just once more, please note once you convert a dbf to the codepage VFP uses on windows (1252 for western/eurpean, but there are others), that doesn't change structure nor data within the dbf records, but the other software working with the codepage the dbf has will now see it in the wrong codepage. This is a case of nobody is right or everybody is right.

If you really want to get this into a VFP table you ideally not just change codepage but create a new DBF and append the data into it. First step surely will be converting it to the windows codepage and then also converting the content/values inside. Becuase you will likely see English 1:1, but not all accents and umlauts and some other special characters, that even English also has infrequently.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Regarding where to learn. There are a lot of books that become freely available like a basics book for VFP6.
There are some tutorial video series and Hentzenwerke still is the only publisher, who cared much for VFP.

The help file has some very good chapters that go beyond just being a language reference. In fact, the language reference section is a separate part of the help and marked as such, so the rest of the help is organized in topics like building a setup or programming for shared data access and explains details.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Hi

I think your question is how to stop this dialog from coming up when you open any table.

issue command "SET CPDIALOG OFF"

this will not open the Code Page dialog box when a table is opened.

Thank you

Mukesh Khandelwal
 
You read minds, Mukesh !
Thanks a ton for that!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top