Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Copy stru with long field names
Message
From
26/05/2004 06:11:01
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
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:
00907237
Views:
11
>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)?

Joel,
1) If later on the way you don't need to change structure further you might use a cursor instead.
2) If cursor is not an option, create your temp dbc, create tables with sys(2015) names (aliases could be friendly). When done, delete the dbc and its tables.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform