Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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 '17, 01:52

Gregory%20Durniak's gravatar image

Gregory Durniak
13991017
accept rate: 0%

edited 10 Nov '17, 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 '17, 07:06

Gregory%20Durniak's gravatar image

Gregory Durniak
13991017
accept rate: 0%

edited 10 Nov '17, 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:

×43

question asked: 10 Nov '17, 01:52

question was seen: 2,442 times

last updated: 10 Nov '17, 08:17