cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Not enough values for host variables: ERROR Message

3,056

This problem has been posted before:
When calling a stored procedure from an application, the error message "Not enough values for host variables is displayed". The stored procedure works fine within dbisql

The problem variable is: Declare MyVar numeric(18,9) Array(56);

I set the variable ( 1 to 55 ) using a Dynamic Query in a Loop, and Execute Immediate.
It works when called in dbisql, but not when called thru a JDBC Connection.
The Application does appear to work, if I hard code the Array Values ( and not use Execute Immediate ).
Using SQL Anywhere 16.0.0.2043.

greg

Accepted Solutions (0)

Answers (1)

Answers (1)

I found the problem.
Since my Dynamic Query has Quoted Identifiers, I have to use "Execute Immediate With Quotes On".
Still odd, that it somehow works in dbisql !

greg