Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create table command doesn't do anything
Message
From
28/11/2001 04:45:17
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00586484
Message ID:
00586826
Views:
13
>Hi everybody,
>
>I think, I'm going crazy. Here is the code
>
create (m.lcNewBldMstr+'_B') database (m.lcNewBldMstrName) from (m.ltBldMstr)
>
>ltBldMstr is a temp table (created by copy structure extended command)
>
>I was stepping through this code in debugger and this line was executed. So, in my opinion, the new blank table should be created. However, the table is full of records, which are leftover from the previous run. I ran this code several times and always table contained records. What could be wrong here?
>
>Of course, I can delete the whole database and recreate this table in a code, but why this line doesn't do, what I'm thinking, it should do?
>
>Thanks in advance for saving me from insanity...

Nadya,
No error or wrapped somewhere and hidden ? If no error really strange.
First you should drop the existing table. Otherwise it's expected it to say something like '...dbf is already part of...'. Next through variables if you're trying to create it under anoher .dbf name then other table's (the table with structure) first record should have table_name empty. Otherwise this time VFP would error something like "object '...' already exists as part of DBC. Use a different name."
Other than that create from tablename works successfully. If you'd do this frequently then do not use 'database' clause. You wouldn't get the errors and create refresh table each time (provided not in use elsewhere).
If you'd keep in database why trying to create new each time ? Zap and use. Kept indexes would be a bonus.
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
Next
Reply
Map
View

Click here to load this message in the networking platform