0

I using SQL Server 2000 and running SQLMetal to generate my Mappings.xml and my DataContext code

This all works fine for CRUD to a table.

Now I need to use stored procedures to perform my CRUD to the table with the same structure.

I know how to do this using the nice designer in VS 2010 and to a SQL Server 2008, but how do you do this by hand with SQL Server 2000?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Coppermill
  • 6,676
  • 14
  • 67
  • 92

1 Answers1

2

The /sprocs option in the SQLMetal command line options extracts the mappings for Stored Procedures from the database. The mappings would be similar to the table/view mappings that you're seeing currently.

So a sample command would look like.

sqlmetal /server:myserver /database:northwind /sprocs /map:Mappings.xml

Refer this MSDN doc for detailed list of command line switches.

Be aware of the limitations of Linq To SQL with MS SQL Server 2000, refer this MSDN doc for some of the known limitations.

IUnknown
  • 888
  • 7
  • 18