Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Copying Dbf to SQL
Message
De
17/10/2012 09:45:30
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01555166
Message ID:
01555168
Vues:
97
If you are more or less running out of delimiters, I suggest [ and ] which rarely cause any conflict. I have many programs which create HTML, and I had a big problems with getting the delimiters to suffice and to line them up. With [ and ] these problems disappeared. Another nice thing with [ and ] is that it's easy to distinguish the starting delimiter and the ending delimiter.

I use PEMEditor, and I have configured BeautifyX to automatically change all my text delimiters into these signs.

>I have a lot of Character fields that I am uddating onto Sql Server.
>I have written a .prg to do this, using a SqlExec as in
> nResult = SQLEXEC(lnHandle,lcInsert)
>and the Insert includes all the fields just strung together
>(Insert into MyTable (Fld1,fld2,fld3) Values 'aaaaa','bbbbbb','ccccc')
>
>Working for the most part .
>I have a lot of Single quotes in the Columns so I do a Replace MyField with Strtran(Myfield,"'", "''")
> (Replace a Single Quote with a double quote, otherwise SQL command goes mad)
>
>This workks for the most part, unless for instance there are lots of Single Quotes (or a single quote as the very last charcater in the field), in which case the data gets truncated, sometimes ending up with a single quote any way and an error
>
>Is there a more elegant/better way to do this (if I was using .Net , I'd use Paramaters but dont htink I can do this in .prg)
> so as to overcome this single quote problem
>
>Tia
>Gerard
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform