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, PHP 5.4.34, and the extension php-5.4.12_sqlanywhere.dll.

Has anyone else seen this?

Thanks, Terry

asked 30 Oct '14, 11:23

Terry%20Wilkinson's gravatar image

Terry Wilkinson
accept rate: 40%

There has been a bug fixed in v16.0.0.2007 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 )
        select @a + @b as c;
    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.
permanent link

answered 30 Oct '14, 11:46

Volker%20Barth's gravatar image

Volker Barth
accept rate: 32%

Thanks Volker.

I didn't know there was a newer EBF; When I click "Help/SQL Anywhere 16/Check For Updates.", Sybase Central reports "You are Up-To-Date There are no updates for your installed software."

Can you please give me a link to the newest EBF?

Thanks, Terry

(30 Oct '14, 12:52) Terry Wilkinson
Replies hidden

Hm, can't comment on that... Here's a general link how to download EBFs in the new SAP Marketplace - I don't have a particular link for a current EBF at hand (and I still don't feel home in that SAP places, sigh.):

A Guide to Downloading SAP SQL Anywhere Support Packages

(30 Oct '14, 13:21) Volker Barth

Hmmm. Don't have a support package, just using the free developer version at this time. Guess I'll have to wait and see if they will release the latest fixes to the Developer Edition.

(30 Oct '14, 13:44) Terry Wilkinson

This issue is also documented in KBA #2052460.

(30 Oct '14, 15:01) Jeff Albion
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 30 Oct '14, 11:23

question was seen: 1,048 times

last updated: 30 Oct '14, 15:01