Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CA connecting to table with space in name
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01485210
Message ID:
01485407
Vues:
47
>>I am connecting to a SQL server table with a space in the table name (say, [my table]) via a CursorAdapter. How should I write the UpdateNameList property of the CursorAdapter.
>>
>>I tried quoting the table name with a pair of square brackets like "id [my table].id, num [may table].num". However the CursorAdapter failed to update the master table with the changes in the cursor.
>>
>>Any idea?
>
>I think here you should use the name of the cursor, not the table. Did you try that? Also, perhaps it's not too late to rename this table and remove the space?
>
>Read this blog post
>Do not use spaces or other invalid characters in your column names

I disagree with that post. Why would aesthetics or the perceived difficulty in reading/understanding be a factor whether to use a feature or not? What if I like to use the brackets for I like them and makes easier for ME understanding and reading the code.
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?

"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare

"To die for a religion is easier than to live it absolutely"
Jorge L. Borges
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform