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

asked 10 Nov, 01:52

Gregory%20Durniak's gravatar image

Gregory Durniak
61357
accept rate: 0%

edited 10 Nov, 08:17


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

permanent link

answered 10 Nov, 07:06

Gregory%20Durniak's gravatar image

Gregory Durniak
61357
accept rate: 0%

edited 10 Nov, 07:07

Your answer
toggle preview

Follow this question

By Email:

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

By RSS:

Answers

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:

×40

question asked: 10 Nov, 01:52

question was seen: 53 times

last updated: 10 Nov, 08:17