Click here to Skip to main content
15,889,590 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Anybody knows how to add a named parameter in to query when using Visual Studio Query Builder(Graphically-Not by using vb.net command).

I know about parameter using ? symbol, but with this method I'll have to pass in the same value repeatedly for each column that i have to compare the value with.

The database I'm using is of Access 2013.

What I have tried:

As I was trying to crate a query using Query Builder with @keyword inside filter column it automatically change the expression in to " ='@keyword' "
Posted
Updated 11-Nov-18 6:11am

1 solution

The problem is that you can't used named parameters with an Access database in the query designer. Access databases need more SQL code than the designer will generate to support named parameters.

Without this extra SQL code, Access reverts to positional parameters, meaning the parameter values you pass in must in the order that the parameters appear in the resulting SQL query.

If you're trying to just pass a single named parameter and reuse that parameter multiple times in the query, it's not going to work.

Seriously, nobody who writes code for a living uses the designers. They're too limiting and hide the details of what's really going on behind the scenes.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900