0

I'm using LinqToSQL in a 3.5 framework project in VS2K8, running against MS SQL 2k8.

When I create the table mappings using the design surface within Visual Studio everything works fine.

When I create the table mappings using SQLMetal (from the Windows SDK v6.1), SQLMetal complains about about the SQL Server 2k8 datatypes (e.g. date and time) that I'm making use of.

Does SQLMetal support the SQL Server 2k8 datatypes? Do I need an updated version? Or do I have to create my mapping in the visual designer/revert to SQL Server 2k5 datatypes?

Thanks

Marc
  • 3
  • 1

1 Answers1

1

As far as i know it supports it, so you probably need a newer version of SqlMetal. In the initial version, when Visual Studio 2008 was launched it was not supporting this so probably that's why you have this problem.

According to MSDN:

The SQLMetal file is included in the Windows SDK that is installed with Visual Studio. By default, the file is located at drive:\Program Files\Microsoft SDKs\Windows\vn.nn\bin. If you do not install Visual Studio, you can also get the SQLMetal file by downloading the Windows SDK.

Adrian Fâciu
  • 12,414
  • 3
  • 53
  • 68
  • Yeah, make sure you're using VS2008 SP1 (3.5 SP1). It should use DateTime for the date columns (stored with a time component of 00:00:00) and TimeSpan for time columns. – GalacticCowboy Jun 10 '10 at 13:47
  • Where do I find an updated version of SQL Metal? I have vs2k8 SP1 installed, but that didn't seem to come with the utility at all - I had to download the Windows SDK... – Marc Jun 10 '10 at 17:56
  • Got it working, at last - thanks. The version from \Microsoft SDKs\Windows\v6.0A handles the SQL2008 datatypes, whereas the (presumably more up to date) version at Microsoft SDKs\Windows\v6.1 doesn't! – Marc Jun 11 '10 at 07:00