By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,704 Members | 1,944 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,704 IT Pros & Developers. It's quick & easy.

Probleme sql UPDATE par odbc/php

P: n/a
Bonjour,

dans un script php je fais un odbc_exec($db_apisoft, $sql)
la chaine sql est UPDATE client SET FacNom="BLOT JEAN-LOUI",
FacAdr="CHANTEGREL", FacCp="24120", FacVille="PAZAYAC", ModeReg="3",
Domiciliation="TERRASSON", Etablissement="12406", Guichet="00016",
CompteBanque="00176950810", CleRib="23", FamilleClient="2" WHERE
Code="32103"

j'ai l'erreur suivante :
Warning: SQL error: [Microsoft][Pilote ODBC Microsoft Access] Trop peu
de paramètres. 6 attendu., SQL state 07001 in SQLExecDirect in
d:\program files\easyphp\www\test.php on line 73

alors que si j'execute cette requete sql directement dans access ça
fonctionne !

Merci de votre aide.

Denis.
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 7 Oct 2003 06:47:44 -0700, po***********@laposte.net (Denis) wrote:

On parlez Anglais ici.
Iterate over the Parameters collection to find out what's going on. Or
run the query interactively, and Access will tell you.
One thing I see as a problem is that you have double-quotes around
numeric values. That's why I don't believe your statement that you
executed the *exact* same query interactively.

-Tom.

Bonjour,

dans un script php je fais un odbc_exec($db_apisoft, $sql)
la chaine sql est UPDATE client SET FacNom="BLOT JEAN-LOUI",
FacAdr="CHANTEGREL", FacCp="24120", FacVille="PAZAYAC", ModeReg="3",
Domiciliation="TERRASSON", Etablissement="12406", Guichet="00016",
CompteBanque="00176950810", CleRib="23", FamilleClient="2" WHERE
Code="32103"

j'ai l'erreur suivante :
Warning: SQL error: [Microsoft][Pilote ODBC Microsoft Access] Trop peu
de paramètres. 6 attendu., SQL state 07001 in SQLExecDirect in
d:\program files\easyphp\www\test.php on line 73

alors que si j'execute cette requete sql directement dans access ça
fonctionne !

Merci de votre aide.

Denis.


Nov 12 '05 #2

P: n/a
Hi and thank you for your answer,

sorry to wrote the post in french but it was published through google
and i thought it was french newsgroup.

i've found that i rather use simple quotes instead of doubles around
fields. And then make a php function to escape ' and " in the sql
statement.
Now it works fine.

Thx again.

Denis.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.