Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parametrized update command
Message
 
 
À
02/04/2019 09:46:16
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01667828
Message ID:
01667830
Vues:
49
>>Hi,
>>
>>I am testing a parameterized update command (for SQL Server database) and having a problem. Here is my code:
>>
>>cSqlUpdate = "update mytable set field1 = ?" + cNewFld1Val + ", field2 = ?" + cNewFld2Val + " where pk = 10"
>>lnResult = SQLEXEC( nSqlHandle, cSqlUpdate)
>>
>>I get a prompt to enter a value (as if I didn't specify the values cNewFld1Val or cNewFld2Val.
>>Is this possible because the value of cnewFld2Val has a question mark ("?")?
>>
>>TIA
>
>cSqlUpdate = "update mytable set field1 = ?cNewFld1Val , field2 = ?cNewFld2Val where pk = 10"
>lnResult = SQLEXEC( nSqlHandle, cSqlUpdate)
Thank you! Rookie mistake.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform