From: Rich on
The following statement came from a sample project I downloaded from
Codeproject - sample illustrating WCF, MVC with asp.net (sql code in the
project to set up a database for the sample project)

ALTER DATABASE [BugTracker] SET COMPATIBILITY_LEVEL = 100
GO

I get this error:
Msg 102, Level 15, State 1, Line 1
Incorrect syntax near '100'.

The sample project was developed in VS2008 (C#) -- which I have loaded on my
workstation and can (sort of) run. My place is currently running sql server
2000 on the server box and sql 2005 tools on my workstation. I have sql 2005
express edition (I think it's 2005) on the workstation. Does the statement
above require sql server 2008 express? Or is there actually a syntax error?
How to fix this?

Thanks,
Rich
From: Rich on
And here is one other statement that did not run from the Database setup code


ALTER DATABASE [BugTracker] SET HONOR_BROKER_PRIORITY OFF
GO

The project used linq to objects, entity framework, ... I have been able to
use entity framework with sql server 2005 express edition (or whatever
edition I have loaded from VS2008). What can I do (what should I do) about
the statement above? Can I ignore it? Is there a workaround?

Thanks.


"Rich" wrote:

> The following statement came from a sample project I downloaded from
> Codeproject - sample illustrating WCF, MVC with asp.net (sql code in the
> project to set up a database for the sample project)
>
> ALTER DATABASE [BugTracker] SET COMPATIBILITY_LEVEL = 100
> GO
>
> I get this error:
> Msg 102, Level 15, State 1, Line 1
> Incorrect syntax near '100'.
>
> The sample project was developed in VS2008 (C#) -- which I have loaded on my
> workstation and can (sort of) run. My place is currently running sql server
> 2000 on the server box and sql 2005 tools on my workstation. I have sql 2005
> express edition (I think it's 2005) on the workstation. Does the statement
> above require sql server 2008 express? Or is there actually a syntax error?
> How to fix this?
>
> Thanks,
> Rich
From: Erland Sommarskog on
Rich (Rich(a)discussions.microsoft.com) writes:
> The following statement came from a sample project I downloaded from
> Codeproject - sample illustrating WCF, MVC with asp.net (sql code in the
> project to set up a database for the sample project)
>
> ALTER DATABASE [BugTracker] SET COMPATIBILITY_LEVEL = 100
> GO
>
> I get this error:
> Msg 102, Level 15, State 1, Line 1
> Incorrect syntax near '100'.
>
> The sample project was developed in VS2008 (C#) -- which I have loaded
> on my workstation and can (sort of) run. My place is currently running
> sql server 2000 on the server box and sql 2005 tools on my workstation.
> I have sql 2005 express edition (I think it's 2005) on the workstation.
> Does the statement above require sql server 2008 express?

Yes, SET COMPATIBILITY_LEVEL for ALTER DATABASE is new syntax in SQL 2008.

Does not the sample have any documentation about which version of SQL Server
that is required?

It is possible that you can ignore this and the other error, but there
may be other things in the sample that requires SQL 2008, so I would
install SQL 2008 Express to minimise the hassle.


--
Erland Sommarskog, SQL Server MVP, esquel(a)sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

 | 
Pages: 1
Prev: Partition Handling
Next: scope_identiry