Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy stru with long field names
Message
 
 
To
25/05/2004 20:55:46
Joel Hokanson
Services Integration Group
Bellaire, Texas, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00907151
Message ID:
00907153
Views:
14
Try
lcTable = "xxtemp.dbf"
IF FILE(lcTable)
  SELECT 0
  USE (lcTable)
  IF NOT EMPTY(CURSORGETPROP("Database"))
    USE
    DROP TABLE (lcTable)
  ENDIF
ENDIF
BTW, can you use a cursor instead of table? It can have long field names also.

>I occasionally want to copy the structure from an SQL table to a temporary DBF file on my hard disk. I use a DBC because the SQL table has long field names.
>
>The easy way is
>Open database SQL_views
>Use sql_data_file nodata
>Copy stru to xxtemp database tempwork
>
>PROBLEM is that xxtemp.dbf might exist and might be part of a different dbc.
>
>So I can not just erase xxtemp.dbf and I can not open tempwork.dbc and delete xxtemp because it may be part of another DBC.
>
>Even after I have erased xxtemp.DBF and erased the DBC (tempwork.*), it STILL says that xxtemp.dbf already exists as part of a database.
>
>How can I overwrite file xxtemp.dbf and remove it from whatever DBC it is attached to?
>
>How do I know what DBC that a given dbf is attached to (or not attached)?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform