Click here to Skip to main content
15,879,095 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The "tbUser" table contain for example :
ID iID Name Ip Time
1 1 Hansen 192.15.145.48 09/05/2011 07:59:46
2 1 Svendson 168.201.12.15 09/05/2011 07:58:33
3 1 Pettersen 192.15.145.48 09/05/2011 06:44:10
4 5 Jack 74.86.127.39 09/05/2011 06:22:55
i use
Rs.Open "select * From tbUser Where iID = 1 Order by Time DESC", Conn, 3, 2
the result will be
ID iID Name Ip Time
1 1 Hansen 192.15.145.48 09/05/2011 07:59:46
2 1 Svendson 168.201.12.15 09/05/2011 07:58:33
3 1 Pettersen 192.15.145.48 09/05/2011 06:44:10
but what i want is to only show
ID iID Name Ip Time
1 1 Hansen 192.15.145.48 09/05/2011 07:59:46
2 1 Svendson 168.201.12.15 09/05/2011 07:58:33
what i want if there is multiple rows where the ip is the same only show the last row how can i do that
Posted
Updated 10-May-11 16:23pm
v3
Comments
Om Prakash Pant 11-May-11 0:59am    
last name will come since the name field is different correct? or you want the first name with whatever name if there are multiple IPs?

1 solution

cant u retrieve teh dataset and then do a comparison in it to check if there are multiple rows with the same IP. u can do a filter on the dataset table for each IP, If the filter gives u more than 1 row then u know u need to shwo that row. U can use the RowFilter property to do this. Hope this helps.
 
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