views:

99

answers:

1

Here's the story: I created a SQL Compact 3.5 database and used SQLMetal.exe to generate DataContext for it. It worked well, but soon I realized that it simply does not suit my needs so I decided to go for SQL Express 2008. I fired up the very same SQL script I used for the Compact to create schema and then fired up SQLMetal.exe tool. I didn't expected the generated DataContext to be different, but I was missing all the relations for some reason.

Here's the SQL Compact commandline:

SQlMetal.exe /code:MyCode.cs MyDatabase.sdf

And here's the SQL Express 2008:

SQlMetal.exe /code:MyCode.cs /server:MyServer /database:MyDatabase

Any ideas?

+1  A: 

Try SQL Server 2005. It should work fine.

Piotr Czapla
This does the trick. Would it be a 2008 bug?
gavoja
SQL2008 supports additional syntax not present in earlier versions, hence the syntax may differ.
Martín Marconcini