Hi,
I'm using Linq in Vb.net 2012but I'm getting an error as " 'query' is not declared. It may be inaccessible due to its protection level"
how to solve this issue
Imports System.WindowsImports System.DataImports System.Data.SqlClientImports System.LinqImports System.Collections.Generic
'======================================================================================================Dim parent As DataTable = dset.Tables("magenmst")Dim child As DataTable = dset.Tables("magengrp")
dim query = _ From P In parent.AsEnumerable, c In child.AsEnumerable _ Where P.Field(Of)("agcode") = c.Field(Of )("aggrpcd") _ Select P,c;
Dim view As DataView = query.AsDataView()'======================================================================================================