Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP-FB Write Description for Table and Field using SPT
Message
De
29/11/2004 08:18:12
Dorin Vasilescu
ALL Trans Romania
Arad, Roumanie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
Divers
Thread ID:
00964236
Message ID:
00965388
Vues:
10
This message has been marked as a message which has helped to the initial question of the thread.
Hi
Sorry for late reply.

You have 2 two ways for this.

1. Use standard escape sequences by doubling the special character ( in this case simple quote )
SQLEXEC(nConnHnd, [update rdb$relation_fields set rdb$description = 'Some text with ''quotes'''  where rdb$field_name = 'FIELD_NAME' and rdb$relation_name = 'TABLE_NAME'])
2. Use parameters
cDesc =  [Some text with 'quotes']
SQLEXEC(nConnHnd, [update rdb$relation_fields set rdb$description = ?cDesc  where rdb$field_name = 'FIELD_NAME' and rdb$relation_name = 'TABLE_NAME'])
In both cases, description is updated with single quotes.


>Also I have one more question to you regarding the desciptions. As strings can only be sent to the ODBC/FB in single quotes, eg. 'Dorin', how can I send a string like this 'Dorin's notebook'. The apostrophy s is creating a problem. I have tried both "Dorin's notebook" and [Dorin's notebook], just in case if it is valid in FB, but no luck. So right now I have used CHRTRAN() to convert ' to " and it does look funny 'Dorin"s notebook'.
>
>I have also tried to put a /, //, \, or a \\ before the ' like this /', //', \' and \\' but no luck.
>
>Please advise.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform