Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Space in dbc name
Message
From
12/07/2006 11:35:04
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01135534
Message ID:
01135729
Views:
10
>>I found this accidentally... testing a converter of mine, which was supposed to convert old dos free tables into new tables with a dbc. It was using a directory name as the dbc name, and I forgot that and had a space in the name of the directory. And it still works!
>>
>>Dbc() returns "M:\RAD\APVFP\OS DZ\DATA\OS DZ.DBC", and when I try to open a table, intellisense kicks in and gives me the proper syntax:
>>
>>USE "os dz!kupci"
>>
>>This saves me a bunch of time - just when I thought I'll have to rework the automatic naming :).
>
>From USE command help: "On Microsoft Windows 98 and later, spaces are significant in file names; therefore, avoid using extraneous spaces in TableName and DatabaseName. If a table or database name contains spaces, enclose the name in quotation marks."

That's one of those things that used to confuse me thoroughly when I was learning Fox (and dBase and Clipper, briefly before that), that there are so many places where you don't have to put quotation marks around a string, and the interpreter/compiler will just eat them. Aliases are just one of such places - you can omit the quotes in commands, but not in functions. And the dbc!table syntax seemed like one of those weird places where I expected the dbc name to be a name like a variable name, or that VFP would substitute the actual filename with a recomputed alias (as it does when there are spaces in the table name), and that the dbc would be refered to by this alias. But no, it keeps the original filename... which was really a surprise to me.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform