Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
VFP-FB Write Description for Table and Field using SPT
Message
From
29/11/2004 08:18:12
Dorin Vasilescu
ALL Trans Romania
Arad, Romania
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
Miscellaneous
Thread ID:
00964236
Message ID:
00965388
Views:
11
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform