Sql Anywhere Query Error: Not Enough Values For Host Variables
Solution 1:
I fixed this by checking for nulls. When you try to pass a null parameter to Sybase, that's the error you get (at least for me). Have a feeling LoanId is null at some point.
Edit After doing a little more research, I think you can also get this error when you try multiple insert / deletes / updates through the Sybase ODBC Connection in .Net. I don't think this is supported and MSDN seems to say it's vendor specific.
Solution 2:
"Insufficient host variables" can also mean something else but it's applicable to the OP: one of the other causes could be that you have a set of declared variables different from the set your SQL statement is using.
E.g. this could be a typo, or you could have copied in SQL from Visual Studio that was used to fill a dataset table using parameters (like :parm) but in doing so you forgot to declare it (as @parm) in your stored proc or begin/end block.
Post a Comment for "Sql Anywhere Query Error: Not Enough Values For Host Variables"