开发者

SubSonic 2.1 Generating ANSISQL for SQL Server 2008 SP1

开发者 https://www.devze.com 2023-01-13 13:24 出处:网络
I have a previously developed project that I am working on now. The project uses SubSonic 2.1 as ORM and it has been working fine since we decided to move to a newer server. The new server has SQL Ser

I have a previously developed project that I am working on now. The project uses SubSonic 2.1 as ORM and it has been working fine since we decided to move to a newer server. The new server has SQL Server 2008 SP1 and now SubSonic is not behaving as usual.

I debugged the cas开发者_StackOverflowe and found that SubSonic is now generating ANSISQL queries instead of SQL Server friendly ones. I found a solution with 2.2 (customizing IsSqlServer2008 method) but I can't migrate to SubSonic 2.2 because project is really big and has lots of lots of SubSonic queries.

How can I make SubSonic 2.1 to work with SQL Server 2008 SP1?

Thanks


Tell it that you using SQL Server 2005?

2005/2008 are close enough in the sense that 7.0/2000 were.

Edit: What I mean is, override whatever so SubSonic thinks you're on SQL Server 2005.

I've never used SubSonic but your question implies you can override IsSQLServer2008 so is there a IsSQLServer2005 for older versions?


Thanks for replying. I decompiled the old dll and customized the IsSql2008 method and Sql2008Generator class. Now it works like a charm.


other problem is in sql 2000, because SQL2000 notification has in version number string "2008" , subsonic try tu use 2008 query (for paging) in 2000, and of course there is big mess. So for SQL2000, last good subsonic 2.x version is subsonic 2.1.

0

精彩评论

暂无评论...
验证码 换一张
取 消