>>>Using VFP7 on Windows 2000 Pro
>>>
>>>The following line:
>>>
>>>CREATE (lcTable) FROM DbfStru
>>>
>>>is causing me grief. lcTable = "c:\somepath\sometable.def" which results in the table being created as: "c:\somepath\sometable.def.dbf" and "sometable.def.fpt". The strange thing is that this only hapens sometimes, and so far only on one machine. So does anyone have a clue here, or should I just insert a file() test and rename the files?
>>>
>>>TTTIA
>>>
>>>Tony
>>
>>Try this before creating the table:
>>
lcTable = JustPath(lcTable) + "\" + JustStem(lcTable)
>>HTH
>
>J.,
>Actually I want to use the .def extension instead of the .dbf extension. Problem is the create command is adding the .dbf. If I JustStem() the filename I will lose the .def, so that won't work. What I am after is "sometable.def" and "sometable.fpt".
Have you tried CREATE TABLE.. FROM ARRAY:
Create Table (lcTable) Free From array gaStru
where gaStru is an array obtained with AFields() on the source table. I did a test for a table with a memo and it does create the base table as .def and the memo has and .fpt extension.