Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Apostrophe in 'Create View' Statement
Message
 
 
À
25/08/2004 20:16:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00936451
Message ID:
00936453
Vues:
31
Hi Alan,

Seems like a bug in VFP8. It works fine in VFP9beta.
The double quotes instead of square brackets work in VFP8Sp1. Try
Create sql view lv_cust as Select * from customer where cust_id = "BERG'S"
>This is in regard to VFP8. I have tested and this problem does not exist in VFP6.
>
>I have a situation where I am creating local views on the fly. If the SQL statement contains an apostrophe, I get a 1522 error "Connectivity Internal Consistency Error", and it is completely repeatable.
>
>As an example, using the testdata dbc that came in the samples/data directory of VFP8, try this in the command window (works the same in a prg):
>
>
lcSql = "Create sql view lv_cust as Select * from customer where cust_id = [BERG'S]"
>&lcSql
>
>I get that internal consistency error. Without the apostrophe in "BERG'S" there is no problem (and this is regardless whether you add an apostrophe to BERGS in the table or not).
>
>Trying a similar thing in VFP6 yields no error either way.
>
>This is coming from an app that I've had out there for a couple of years in VFP6 that worked fine. Now that I've recompiled it into VFP8, I suddenly have this issue. As long as the user stays away from apostrophe's all is well, but the app allows the user to create and enter their own coding and they've been using apostrophes. The view needs to accept that.
>
>Is there something I'm missing here? I've searched, but I haven't found anything on this.
>
>I suppose I can StrTran() or ChrTran() both sides of the equation, but is that my only option?
>
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform