It turns out that the best solution was actually refactoring all of the SQL and code.
In the last few days, I wrote a refactoring application to capture all stored processes, functions, views, table names so that they are consistent, and use the correct body, for example:
select unitid from dbo.unit
will be changed to
select UnitId from dbo.Unit
Then the application also looks at the code and replaces any occurrences of the stored proc and its parameters and corrects them in accordance with the case defined in the database. All datatables in the application are set to an invariant locale (thanks to FXCop for specifying all data types ..), this prevents calls from hanging inside the code.
If anyone likes the application or any advice on the process, you can contact me at dotnetvixen@gmail.com.
source share