Why is SQL Anywhere ignoring the @named parameter?
I am using Dapper to query a SQL Anywhere Datasource and I am getting an error that makes it seem like the "@" prefix for my where where value is being ignored.
Double balance = qb.Query<Double>("select end_balance_amt from QBReportAdminGroup.v_lst_customer where list_ident = @listid", new { listid = ListID }).Single();
Mistake:
Column '@listid' not found
I have access to this table and my manual query is working fine.
select end_balance_amt from QBReportAdminGroup.v_lst_customer where list_ident = '8000000B-1433635931'
Example:
+3
source to share
1 answer
It says that you are trying to use a @listid variable that is not declared.
If I am using DBISQL with SQL Anywhere I would write something like this:
TO BEGIN
DECLARE @list varchar (20);
SET @list = '8000000B-1433635931';
select end_balance_amt from QBReportAdminGroup.v_lst_customer where list_ident = @listid ";
END
+1
source to share