Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Parameters assigned by InlineQuery are always of type DbType.AnsiString #13

Open
holzbrenner opened this Issue Jun 2, 2010 · 0 comments

Comments

Projects
None yet
1 participant

When InlineQuery adds parameters to its command, it always sets their database type to DbType.AnsiString. This probably works in many cases, as these strings are implicitly converted to appropriate data type, but it's dependent on regional settings of Windows and database server (in my case MS SQL Server) for some data types like DateTime, Currency etc. I noticed problems on some developer machines; InlineQuery failed with error message from the server which was unable to convert AnsiString to e.g. DateTime. Perhaps database server was running on a machine with different regional settings than client machine with .NET 2.0 application using SubSonic.

I created a small fix for version 2.2.1.0 to resolve this issue, here is a patch file which can be applied from root: http://freeweb.t-2.net/gundakar/subsonic_dbtype_patch.patch

If SubSonic 2.x is still supported at all, maybe somebody with more knowledge of the library can take a look at my fix as a starting point and do a proper solution for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment