Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using ? mark in a parameterized statement
Message
De
08/08/2007 07:47:20
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
07/08/2007 15:15:41
Raza Malik
Universal Accounting Software
Edgewater, New Jersey, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 7 SP1
Divers
Thread ID:
01246511
Message ID:
01246733
Vues:
21
>Hi Cetin...
>
>My mistake.. I was looking at the wrong example. You code works perfactly. The following code causes an error with a ? mark in the description fields.
>
>
>
>lcSQL = "UPDATE so_b SET " +;
>	    "itm_numb = [" + so_b.itm_numb + "], " +;
>	    "itm_desc = [" + so_b.itm_desc + "], " +;
>         "WHERE iid_numb = " + TRANSFORM(liIid_numb)
>	=SQLEXEC(gnC, lcSQL)
>
>
>Thanks AGain
>Raz

Raza,
Check my sample again. It doesn't use transform() or any other hardcoding as you did. Instead it uses parameters. If you don't use parameters be prepared for a number of headaches (and you'd be lucky if you all get is syntax error).
lcSQL = "UPDATE so_b SET " +;
	    "itm_numb = ?so_b.itm_numb," +;
	    "itm_desc = ?so_b.itm_desc" +;
         "  WHERE iid_numb = ?m.liIid_numb"
	=SQLEXEC(m.gnC, m.lcSQL)
Also check:
Re: How to use ? in variables for UPDATE/INSERT statements? Thread #1235643 Message #1235960
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform