O'Reilly Forums: How Does Linqpad Create Typed Data Context Against Sql 2000? - O'Reilly Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

How Does Linqpad Create Typed Data Context Against Sql 2000? Rate Topic: -----

#1 User is offline   markheath 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 25-February 12

Posted 25 February 2012 - 01:31 PM

I have been using LINQPad's LINQ to SQL provider to write LINQ Queries against a SQL 2000 database, which works great. Then I tried to create the same typed DataContext classes that LINQPad generates in a Visual Studio app and ran into problems because the OldDB provider required to connect to SQL Server 2000 doesn't support LINQ 2 SQL.

At the moment, I am referencing the temp file that LINQPad creates (and LinqPad.exe as well), just to be able to use that typed data context in my own app. Is there a special trick that LINQPad uses that I can make use of too? (n.b. would be a great feature if LINQPad could save the typed datacontext to a self-contained DLL that you could import into your project).

thanks
0

#2 User is offline   JoeAlbahari 

  • Super Veteran Member
  • PipPipPipPipPipPipPipPipPipPipPip
  • Group: Members
  • Posts: 529
  • Joined: 15-February 08
  • Gender:Male
  • Location:Perth, Australia

Posted 25 February 2012 - 04:59 PM

SqlClient suppports SQL 2000; I supect it's just Visual Studio's solution explorer that doesn't. You could try an earlier version of VS, or build your typed DC against a later version of SQL Server and then change the connection string at runtime to point to your SQL 2000 instance.

LINQPad has its own logic for building a typed DataContext (it doesn't use SqlMetal).

Cheers
Joe
0

#3 User is offline   markheath 

  • New Member
  • Pip
  • Group: Members
  • Posts: 2
  • Joined: 25-February 12

Posted 26 February 2012 - 06:23 AM

View PostJoeAlbahari, on 25 February 2012 - 04:59 PM, said:

SqlClient suppports SQL 2000; I supect it's just Visual Studio's solution explorer that doesn't. You could try an earlier version of VS, or build your typed DC against a later version of SQL Server and then change the connection string at runtime to point to your SQL 2000 instance.

LINQPad has its own logic for building a typed DataContext (it doesn't use SqlMetal).

Cheers
Joe


thanks for the info, I'll try with VS2008
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users