I have it working, but I am not sure if that's the best way to do it.
I create a table in my dataset:
Code:
[blue]
Private dvFileNumber As New DataView[/blue]
Dim strFile As String = "SELECT DISTINCT PSBRDG_PROJECTNAME, " _
& " PSBRDG_PROJECTNUMBER, PSBRDG_FILE_NUMBER " _
& " FROM S4111000.PSBRIDGE_INFORMATION"
[green]
'Create tblFileNumber in my dsDtSet[/green]
Call SetNewTableInDS(strFile, "tblFileNumber")
[blue]
dvFileNumber.Table = dsDtSet.Tables("tblFileNumber")[/blue]
For now I have:
Code:
For Each row As DataRow In dsDtSet.Tables("tblFileNumber").Select("(PSBRDG_PROJECTNAME = '" & cboPinNumber.SelectedValue & "') " _
& " AND (PSBRDG_PROJECTNUMBER = '" & cboProjNumber.SelectedValue & "')")
lblFileNo.Text = row("PSBRDG_FILE_NUMBER").ToString
Next
I tried several variations of (code in red):
Code:
dvFileNumber.RowFilter = "(PSBRDG_PROJECTNAME = '" & cboPinNumber.SelectedValue & "') " _
& " AND (PSBRDG_PROJECTNUMBER = '" & cboProjNumber.SelectedValue & "')"
[red]
lblFileNo.Text = dvFileNumber.Table.Rows(0).Item("PSBRDG_FILE_NUMBER").ToString ...???[/red]
The [tt].RowFilter[/tt] works fine, it is just how do you get the data from DataView?
Or am I already *there* with [tt]Select[/tt] on the Table itself and should be happy with it? And forget about DataView in this case?
Have fun.
---- Andy