RvR2000

Hi,

I have 2 datagrids (with their own dataset). When a row is selected and a buton is pressed the record Aanboord needs to be changed.

I've added my code so far, but it gives an error.

please note that the crewid is a autogen. nummer by MS Access.

Dim view As DataRowView

view = DirectCast(Me.CrewBindingSource.Current, DataRowView)

Dim viewrecord As String = view.Item("crewid").ToString

Dim viewname As String = view.Item("Achternaam").ToString

Dim viewrang As String = view.Item("Rang").ToString

If MsgBox("Wilt u " & viewrang.ToString & " " & viewname.ToString & " aanmonsteren", MsgBoxStyle.OkCancel, "Aanmonsteren ") = MsgBoxResult.Ok = True Then

Dim ConString As String = "Provider=Microsoft.Jet.OLEDB.4.0;Password="""";User ID=Admin;Data Source=""D:\program files\nozem\nozem.mdb"";"

Dim DBCon As New OleDb.OleDbConnection(ConString)

DBCon.Open()

crewidDA = New OleDb.OleDbDataAdapter("SELECT * FROM crew WHERE crewid='" & viewrecord & "'", ConString)

crewidCB = New OleDb.OleDbCommandBuilder(crewidDA)

crewidDA.Fill(crewidTable)

crewidTable.Rows(crewidRow)("Aanboord") = Ja

crewidDA.Update(crewidTable)

End If

Another issue is how to filter 2 items.

for example filter voornaam and achternaam from crew (as like the DataAdapter string.

Please help, which will be highly appriciated.

Thanx



Re: Visual Basic Express Edition What is wrong??

Riquel Dong ¨C MSFT

Hi Rva2000,

Please clarify what is the error in your application and where the error occurs.

Best regards,

Riquel