Re: CLI Error: Too many or too few host variables given.
Posted in 1998
We had a similar problem after upgrading to 7=2E2=2E The fix was to=20 change the link phase to use ld explicitly, rather than using cc to=20 link=2E You need to include the following flags in the link line as=20 well =20 -lm -lc -lC /usr/lib/xlC/lib/crt0=2Eo =20 You may also need the -K flag=2E We did for some executables=2E =20 HTH Davin ______________________________ Reply Separator ____________________________= _____ Subject: CLI Error: Too many or too few host variables given=2E Author: PC {hans=2Eter-horst@sema=2Efr} at INTERNET Date: 08/01/98 10:47 I receive the following error: "Too many or too few host variables=20 given=2E" when I use the SQLPrepare statement with a parameter marker=2E Ha= ve=20 a look at the litle piece of code I added below: =20 longlen =3D SQL_NTS; =20 rc =3D SQLPrepare (stmt, "INSERT INTO table VALUES ( ? );", SQL_NTS); =20 if (rc =3D=3D SQL_SUCCESS || rc =3D=3D SQL_SUCCESS_WITH_INFO)=20 { SQLBindParameter (stmt, 1, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, 256,=20 0, data, 0, &len); rc =3D SQLExecute (stmt);/* <-- */ } =20 Informix 7=2E2 OS: AIX 4=2E2 =20 -------------------=3D=3D=3D=3D Posted via Deja News =3D=3D=3D=3D----------= ------------- http://www=2Edejanews=2Ecom/ Search, Read, Post to Usenet =20 ********************************************************************** DST International Tel:+44 181 390 5000 www=2Edstinternational=2Eco=2Eu= k=20 This message and any attachments to it is intended only for the=20 individual or company to which it is addressed and may contain=20 information which is privileged, confidential or prohibited from=20 disclosure or unauthorised use=2E If the recipient of this=20 transmission is not the intended recipient, or the employee or agent=20 responsible for delivering such materials to the intended recipient,=20 you are hereby notified that any use, any form of reproduction,=20 dissemination, copying, disclosure, modification, distribution and/or=20 publication of this e-mail message or its attachments other than by=20 its intended recipient is strictly prohibited by the sender=2E =20 If you have received it in error, please notify us immediately by=20 telephone on the number above and destroy the message and all copies=20 in your possession=2E **********************************************************************