Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help! Weird message while packing tables
Message
From
23/10/1998 14:48:14
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Help! Weird message while packing tables
Miscellaneous
Thread ID:
00149955
Message ID:
00149955
Views:
41
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
Next
Reply
Map
View

Click here to load this message in the networking platform