>>2. Copy structure Extended, then create similar table with another name in the database, copy data by COPY command, then delete old table. I know this could be slow, but I guess you do not going to do such things every day in production database...
>>
>Vlad, I did exactly 2
>What I had, I have big number of databases with big numbers of tables.
>They have casual code pages.
>I needed to put all wrong code pages into 1251 by program
>I do it in 3 steps
>open table, check for code page, if it is not 1251
>I use copy to newtempname name newtempname with cdx as 1251
>drop oldtable
>rename newtempname to oldtable
>Validate is not clue, because when we do rename in the database designer by hands, we don't do validate
>When I open database container like table and look there, it still have
>old file name there, but new table name
>I pretty shure , that copy structure is not clue too, becase it also require
>data copy from one table into new one, but rename in database designer works fast and obvious does not copy data for big table
>So, it must be direct analog of rename in the database designer and it must be simple enough
Maybe just running
do home()+"tools\cpzero\cpzero" with cTablename, 1251
on all the tables would do it? Haven't tried it on tables within a database, and I don't know if codepage information is written anywhere else. What CPZero.prg does is fix the 29th byte of the header and write the proper byte there, which pertains to a given codepage. This is easy to test - backup first, do this on only one table, check the results. If it works, do it on all tables.