From: Warren Young Date: May 24 2010 4:48am Subject: Re: About "Failed to find MySQL C API type ID for" Exception List-Archive: http://lists.mysql.com/plusplus/8961 Message-Id: MIME-Version: 1.0 (Apple Message framework v1078) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable On May 23, 2010, at 7:10 PM, hu.ruyu@stripped wrote: > mysqlpp::SQLQueryParms sqp; > sqp.resize(2); > mysqlpp::sql_int sqlint =3D 5 > sqp[0] =3D sqlint; // throw mysqlpp::Exception = here > sqp[1] =3D = mysqlpp::SQLTypeAdapter(string("test5")); > mysqlpp::UseQueryResult res =3D query.use(sqp); Do you have a good reason to build the template query this way? Those = six lines can be replaced with one: UseQueryResult res =3D query.use(5, "test5"); It's less verbose to pass the parameters into the query execution = function (store*(), use(), exec*()...) instead of building a = SQLQueryParms object each time. If that still causes an exception, I'd guess it's because you're saying = "%0q" for the integer parameter, which doesn't have to be quoted. Say = "%0" instead.=