I'm getting a strange error from the PHP function sasql_prepare().
Most of the time it works fine, but from time to time, usually right after I first start my system, I get the error "Warning: sasql_prepare(): SQLAnywhere: [-188] Not enough values for host variables".
This is a strange error to get from that function since the host variables are actually supplied later with sasql_stmt_bind_param_ex(). If I really have supplied the wrong number of variables, I would expect the error later from sasql_stmt_execute().
If I simply re-issue the same call, it always works.
I'm running Windows7, SQL Anywhere 220.127.116.118, PHP 5.4.34, and the extension php-5.4.12_sqlanywhere.dll.
Has anyone else seen this?
asked 30 Oct '14, 11:23
There has been a bug fixed in v18.104.22.1687 that has also raised that error right after a started database though it's attributed to ODBC, so I don't know whether that meets your situation. However, trying the newest EBF might be of help.
Cf. the CR note 769156:
================(Build #2007 - Engineering Case #769156)================ Given a simple stored procedure such as the following: create procedure sp_test( in @a integer, in @b integer ) begin select @a + @b as c; end Binding two host variables and executing “SELECT * FROM sp_test(?, ?)" just after starting the database server, then the error "Not enough values for host variables" might have resulted. Subsequent execution attempts would have succeeded. A similar problem would have occurred when "SELECT * FROM sp_test(?, ?)" was executed immediately after (dropping and then) creating the stored procedure. This has now been fixed.
answered 30 Oct '14, 11:46