473,473 Members | 1,822 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Probleme sql UPDATE par odbc/php

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
2 4642
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: grigoo | last post by:
bonjour a tous je me presente a vous::: greg dit le grigoo sur le web ,,etudiant en bioinformatique a montreal et jusqu au cou dans notre language prefere....java. et biojava.. et je suis en un...
0
by: Jim S. | last post by:
I'm having a horrible time simply inserting the date in a MySQL database through a Visual Basic program. I have a table, called "ORDERS"; "ID" is the primary key. I'm trying the insert the date,...
7
by: kaming | last post by:
Dear all, I found that I can't update or delete a DB2 record with timestamp using Access through ODBC. The Access complains "No current record" while I attempt to update or delete the record...
0
by: immergut | last post by:
Hallo! Als Projekt für meine Facharbeiterprüfung habe in das Problem XML-DTD's in Tabellenstruckturen für Access umzuwandeln. Input: XML-DTD Output: SQL-Datei Nun mein Problem:
2
by: Mike | last post by:
I'm trying to update an existing record in an Access 2003 db and i'm getting the following error: The following error has occured ERROR Syntax error in UPDATE statement. at...
1
by: Sajid | last post by:
Hello! Experts, I have the following piece of code in VB.NET that I want to use to update any records in the database. I would like to use a code as well as DataGrid to update the records....
1
by: cindy | last post by:
this is the call private void Page_Load(object sender, System.EventArgs e) { OdbcConnection connection = new OdbcConnection ("DSN=PFW52"); CreateDataAdapter(connection); } this is the code,...
2
by: technocraze | last post by:
Hi guys, I have encountered this error when updating the values to the MS Acess table. Error : Update on linked table failed. ODBC sql server error Timeout expired. MS Acess is my front end and...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.