Downgrading to SQL Server 2005

Topics: Developer Forum
Jan 7, 2010 at 8:11 AM

For the reasons I presented in my post in sunday, I need to downgrade the site to SQL Server 2005.

The first problem I encountered is a definition error in the following function<font size="2">

Private Sub BindHomeArticles()

Using lArticleCtx As New ArticleRepositoryEnd Using  

lvArticles.DataSource = lArticleCtx.GetHomePageArticles



End Sub

The error occur in the first instruction becouse the database doesn't recognize the SysDateTime function. Of course it isn't becouse is a new function in SQL2008, but I cannot find where the SysDateTime function is used in the code with explicit or implicit way as well.

Did somebody encounter the same problem?



Feb 28, 2010 at 8:00 PM

I also need to have it running on a SQL 2005 server and have the same issue. Have you been able to over come the problem?

Mar 10, 2010 at 5:12 AM

Yes me too stack with that problem. How do i running on sql 2005 

Mar 27, 2010 at 4:10 PM

So here's the deal with SQL 2005 and EF. You can create a model against a SQL 2005 DB, generally you will have all the capabilities you will with 2008. But the book was written for the most recent releases, at the time of writing (fall 2008). The EF Model was built against SQL 2008. There is not a good story for reverting the model to an older database. It is actually tied to the db version in the model meta data. So my best advice to you is to delete the ef model from the project. Attach/create or whatever you want to do to get the database in v 2005. Then add a new EF model against that 2005 database. As long as you retain the same model & entity naming conventions the partial classes and namespaces should all synch up for the custom code added in the BLL. Your application should run just fine. I have done this process a few times since starting with EF, so I know it works. I just wish it were a nicer experience than that.