Click here to Skip to main content
15,881,588 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
In database record as follows

Coursename rctpno coursedate coursetimings

AFF 242 24 Nov 14 13.15


My code as follows in vb.net

Dim AFF as string

i want to compare the abvoe AFF value from database using if stamtent from the read

for that how can i do in vb.net using C#.

Regards,
Narasiman P.
Posted
Comments
Hassan Mokdad 18-Nov-14 2:55am    
What do you mean by I do in VB.net using C#?
Aarti Meswania 18-Nov-14 3:13am    
Do you mean to say window application with c#?
and you have to read data from db first please google how to connect with db and read data from table.

1 solution

Took the value of the database table and put those into a DataTable.

Now check the DataTable row, column value with your string value in If condition.

VB
If dt.Rows(0)(1).ToString() = "Your data" 
   //your code
Else
   // your code
End If
 
Share this answer
 
v3

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