find row index where Column = value
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
Should be obvious, but what's the best way to find in a datatable the row index where Column C has Value "X"? Thanks
-
Should be obvious, but what's the best way to find in a datatable the row index where Column C has Value "X"? Thanks
Hi, Dim sql as String = "SELECT ID FROM TABLENAME WHERE C = 'X'" Dim cmd as New SQLCommand(sql, connectionstring) ... open connection... Dim idx as integer = CInt(cmd.ExecuteScalar) Msgbox idx.ToString hope this helps :)
NajiCo http://www.InsideVB.NET[^] It's nice 2b important, but it's more important 2b nice...