In addition to solution #2 by
ppolymorphe[
^]...
Quote:
i have write this code to retrieve data from table where name like gridview value but the loop run only one time not till the all record found.
You're on the wrong track! Imagine, your application is used by 1000 users. All of them start the application at the same time. What's happen with your database? A database is under
DDoS attack[
^]!
You have to create proper sql statement at once, which will return a proper data set. For example:
SELECT t1.*, CBool(t2.[status]="PRESENT") As IsPresent
FROM Table1 As t1 INNER JOIN Table2 as t2 ON t1.PrimaryKey = t2.ForeignKey
Then, you have to bind that data with DataGridView.
Above query statement is totally legal for MS Access database engine.
For further details, please see:
Visual Representation of SQL Joins[
^]