oceanicwang / dapper-dot-net

Automatically exported from code.google.com/p/dapper-dot-net
Other
0 stars 0 forks source link

Doesn't work with OdbcConnection and parameters #137

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create an OdbcConnection
2. Write sql with positional parameters (with question marks declaring the 
variables)
3. Execute a simple query passing in parameters

What is the expected output? What do you see instead?
I would expect the sql to be executed with the parameters but instead I'm 
receiving an odbc error.  It appears that Dapper only works with named 
parameters which is not going to work for most odbc implementations (that I'm 
familiar with anyways).

I looked at Dapper's source and it appears that the CreateParamInfoGenerator 
calls the FilterParameters method which is removing the parameters if they are 
not named within the sql.

Original issue reported on code.google.com by gbrun...@gmail.com on 3 Jun 2013 at 11:59

GoogleCodeExporter commented 8 years ago
This is fixed in the source; see here for a full explanation:

http://stackoverflow.com/a/18867631/23354

Will be included in next deploy, or just build locally.

Original comment by marc.gravell on 20 Sep 2013 at 4:21