I am getting a very strange error while trying to call the stored procedure through ODBC. The ODBC driver that i am using is Merant ODBC driver.

The protocol i am using is the DB2 Wire Protocol. The DB2 version i am using is 7.2 on IBM - AIX.

I am calling the stored procedure from C by using the following syntax


Please note that i have passed the literal 'H' in place of "?"
I have declared the dummy defination of the stored procedure is as follows :


The error text which the ODBC throws is :

[DataDirect][ODBC DB2 Wire Protocol driver][DB2]range for host variable .

X396 Literals are not supported as sto"

We have seen some of the web sites for more detail of the problem. In one of the site we found the following text :

"Unlike ODBC DB2 CLI does not support literals as procedure arguments, parameter markers must be used."

I guess that in DB2 i can n't pass the literal as argument to the stored procedure.

But when i use the Oracle and sql server database then the program executes perfectly and literals are accepted.

Has any one has got any updated/more information than this.
Please let me know if you have any information in this.

Thanks in advance.

With Best Regards