Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Changing Code Page of a DBF
Message
De
10/06/2002 12:50:33
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00666592
Message ID:
00666606
Vues:
13
>>>OK, if the code page of a dbf is zero, and SET CPDIALOG is ON, you get the code page dialog when you open the dbf.
>>>
>>>Great. Now, if the code page is non-zero, and I want to change it (maybe even back to zero), how do I do it? I can't find anything in VFP Help or MSDN Library.
>>>
>>>Thanks,
>>
>>do home()+'tools\cpzero\cpzero' with 'mytable.dbf'
>>Cetin
>
>Thanks, Cetin. That does it, of course.
>
>I think it might be useful to mention the second optional parameter, which is what byte to set the codepage to.
>e.g.:
>437=U.S. DOS
>1252=U.S. Windows
>So:
>DO (HOME()+"Tools\CPZero\CPZero" WITH "TableName.dbf", 437
>would set the table to U.S. DOS codepage.
>
>Cheers,

Yes :) I sometimes do it like :

lcDBF = getfile('DBF') && here I'm sure I can open excl.
handle=fopen(lcDBF,12)
=fseek(handle,29,0)
=fwrite(handle,chr(0),1)
=fclose(handle)
use (lcDBF) exclusive && Asks for codepage
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform