Click here to Skip to main content
16,016,501 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
VB
dtsfill = objclsdata.fnDataSet("select idmenu, Description, MenuPlaceOrder from tbl_menu where active = 1 and parent=0 order by MenuPlaceOrder;", CommandType.Text, )

dtsfill as dataset
dtsfill = objclsdata.fnDataSet("select idmenu, Description, MenuPlaceOrder from tbl_menu where active = 1 and parent=0 order by MenuPlaceOrder;", CommandType.Text )
 Dim query = From d In dtsfill .AsEnumerable Where dtsfill .Field(Of Integer)("Parent") = 0 Select dtsfill

This linq not getting data help me
Posted
Updated 2-Dec-10 20:55pm
v2

1 solution

Hi vishwa,

you can read the datarow directly through Table

please try this

VB
dt.Columns.Add("SlNo")
            dt.Columns.Add("Name")

            Dim dr As DataRow = dt.NewRow
            dr(0) = "1"
            dr(1) = "ANSAL"
            dt.Rows.Add(dr)
            dr = dt.NewRow
            dr(0) = "2"
            dr(1) = "Ajith"
            dt.Rows.Add(dr)
            ds.Tables.Add(dt)

            Dim a As EnumerableRowCollection(Of DataRow) = From p In ds.Tables("TEST") Where p.Item("Name") = "ANSAL" Select p

            Dim SlnoVal As String = CType(a.ElementAt(0), DataRow).Item("Slno")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900