jay
jay

Reputation: 434

Dapper Dynamic Parameter Column or Global Variable not found

I am trying to use dapper and dynamicParameters to query against an AS/400. Any time I add DynamicParameters to my query, I get an error stating the column or global variable is not found.

This is my query: "SELECT * FROM myLib.SITECONTENT WHERE CONTENTACTIVE = @CONTENTACTIVE"

This is what my dynamic parameters look like:

enter image description here

This is how I'm trying to execute my query:

var result = conn.Query<Model.SiteContent>(query, parameters).ToList();

I can query in the database WHERE CONTENTACTIVE = '1' and I get results without issue. And if I run the query without including any dynamic parameters, it works just fine also.

But when I include dynamic parameters, I get an error stating "Column or global variable @CONTENTACTIVE not found.'"

Upvotes: 0

Views: 224

Answers (0)

Related Questions