Hi all.
i am using linq and sqlDataAdapter to connect database and convert it into Datatable . but i get error when i declare DataContext although i also import library for references.
System.Data.Linq.DataContext context;// get error
(Error 1 The type or namespace name 'DataContext' does not exist in the namespace 'System.Data' (are you missing an assembly reference?) C:\Documents and Settings\benzema\Desktop\C#\Resort\WindowsFormsApplication1\App_Code\LinqConnection.cs 18 22 ResortApp
)
Did you know my trouble here?
Thanks and best regards.
Loading
benzema kirismPosted Apr 26, 2010, 6:37 AM
it work fine when i change framwork 3.5.
i have trouble about using LINQ ,how to convert the result in var to Datatable (it means that i use sqlDataAdapter connection).
Could you give me suggestion to do this problem?
thanks
Lalit MPosted Apr 26, 2010, 2:36 AM
http://naturalprogression.wordpress.com/2009/08/07/system-data-linq-datacontext-is-defined-in-an-assembly-that-is-not-referenced/
Hirendra SisodiyaPosted Apr 26, 2010, 1:35 AM
what framework and library are you using????
i think 'System.Data.Linq.DataContext' does not include by default in framwork2.0, but you can find in 3.5 by default.......
thanks
Please mark as answere if it helps