Click here to Skip to main content
15,889,346 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dim dr() As DataRow = dtReport.Select("RePrint = True")

this is my code

i can see the RePrint value (in dataset visualizer) in dtReport but the value is not getting assigned to dr(),
when the value of the Reprint is "true" it should send the dataset row to the dr().

please help me out
thank you

What I have tried:

i tried
Dim dr() As DataRow = dtReport.Select("RePrint = 'True'")
Posted
Updated 17-Jul-17 22:17pm
v2
Comments
Karthik_Mahalingam 18-Jul-17 2:19am    
tested your code, it works fine with boolean and string values.
Member 13297721 18-Jul-17 3:39am    
but it is it getting assigned to ds()??

but for me dr() length=0 its showing
not fetching the value
i need it for boolean value

Thanks for the quick response @karthik bangalore
Karthik_Mahalingam 18-Jul-17 4:18am    
posted a sample solution for bool value, pls chk

1 solution

refer this

VB
Dim dt As DataTable = New DataTable
dt.Columns.Add("RePrint", GetType(System.Boolean))
dt.Rows.Add(true)
dt.Rows.Add(false)
Dim rows() As DataRow = dt.Select("RePrint = true")
Dim count As Integer = rows.Length' 1  
 
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