View Full Version : Named parameter does not work in ms-access
GersonK
12-14-2006, 04:22 AM
When working in ms-access (I didn't try using other database) the Named Parameter does not work. Actually what matters to the AdoTemplate is the order of parameter that was added to the parameter list (by using IDbParametersBuilder, for example) instead of the defined parameter name in the query. Why?
Mark Pollack
12-14-2006, 08:29 PM
Hi Gerson,
For access you are using the OleDb provider and it doesn't support named parameters, only positional parameters as you discovered. The same applies to odbc providers. You can read about some of the differences in this msdn article (http://msdn2.microsoft.com/en-us/library/ms379620(VS.80).aspx) (see Table 6). This is the root of the issue.
In Spring.Java, since jdbc uses positional parameters there was specific named parameter support developed so that queries would be more readable with the positional placeholder character '?' removed. We could add similar support in Spring.NET for those databases that use positional parameters. Would you be interested in such a feature. I'll add it to the roadmap (for 1.2) if we get enough interest.
Mark
GersonK
12-17-2006, 02:46 AM
In Spring.Java, since jdbc uses positional parameters there was specific named parameter support developed so that queries would be more readable with the positional placeholder character '?' removed. We could add similar support in Spring.NET for those databases that use positional parameters. Would you be interested in such a feature. I'll add it to the roadmap (for 1.2) if we get enough interest.
Mark
yep, I use Spring.Java, I really like the named parameters support. but, unfortunately I must work with oledb in the .NET...
I hope this feature gets implemented in the next version :-D!
Thanks!
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.