Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help! Weird message while packing tables
Message
From
23/10/1998 14:52:38
 
 
To
23/10/1998 14:48:14
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00149955
Message ID:
00149960
Views:
15
try to add SET CPDIALOG OFF

>Hi,
> I have a .prg file to pack all the free tables in a folder. It works fine for some tables, but for some dbf files it gives an error message that some code page is not available etc. I have no clue how packing has anything to do with code pages.
> The script is compiled into a .exe file and is winExec'ed from a VC++ 5.x program.
>
>Any clues?
>
>I appreciate ur help.
>
>Thanks
>Puri
>*====My code for packing all free tables in folder========
>parameters sPath
>
>if parameters() < 1
> MessageBox("Please provide the directory for packing")
> quit
>endif
>if len(sPath) <= 0
> MessageBox("Please provide the directory for packing")
> quit
>endif
>
>on error do errhandler with Message()
>set path to &sPath
>* Get list of tables in the folder sPath
>local nTables, sName
>nTables = adir(aTableInfo, sPath+"\*.dbf", "A")
>for i = 1 to nTables
> * Needs exclusive access to the table
> if upper(right(atableinfo(i, 1), 3)) != "DBF"
> loop
> endif
> sName = left(atableinfo(i, 1), len(atableinfo(i, 1))-4)
> use &sName
> select &sName
> pack
> use
>endfor
>
>return 0
>
>function errhandler(sErrMsg)
> MessageBox("Error: "+sErrMsg)
> quit
>endfunc
Edward Pikman
Independent Consultant
Previous
Reply
Map
View

Click here to load this message in the networking platform