M
MadCrazyNewbie
Hey Group,
Just another quick question:
I have the following bit of code:
Private Sub cboPasswordListsDepartment_SelectedIndexChanged(ByVal sender
As Object, ByVal e As System.EventArgs) Handles
cboPasswordListsDepartment.SelectedIndexChanged
Me.BindingContext(dsPasswordList, "PasswordList").EndCurrentEdit()
If Me.BindingContext(dsPasswordList, "PasswordList").Position <> -1
And Not mlLoading Then
dsPasswordList.PasswordList.Rows(Me.BindingContext(dsPasswordList,
"PasswordList").Position).Item("DepartmentID") =
Me.cboPasswordListsDepartment.SelectedValue
End If
End Sub
When I try and Add something to my Datatset the above errors saying
An unhandled exception of type 'System.ArgumentException' occurred in
system.data.dll
Additional information: Cannot set Column 'DepartmentID' to be null. Please
use DBNull instead.
On this Line:
dsPasswordList.PasswordList.Rows(Me.BindingContext(dsPasswordList,
"PasswordList").Position).Item("DepartmentID") =
Me.cboPasswordListsDepartment.SelectedValue
Im so lost Has anybody got any ideas?
Many Thanks Again
MCN
Just another quick question:
I have the following bit of code:
Private Sub cboPasswordListsDepartment_SelectedIndexChanged(ByVal sender
As Object, ByVal e As System.EventArgs) Handles
cboPasswordListsDepartment.SelectedIndexChanged
Me.BindingContext(dsPasswordList, "PasswordList").EndCurrentEdit()
If Me.BindingContext(dsPasswordList, "PasswordList").Position <> -1
And Not mlLoading Then
dsPasswordList.PasswordList.Rows(Me.BindingContext(dsPasswordList,
"PasswordList").Position).Item("DepartmentID") =
Me.cboPasswordListsDepartment.SelectedValue
End If
End Sub
When I try and Add something to my Datatset the above errors saying
An unhandled exception of type 'System.ArgumentException' occurred in
system.data.dll
Additional information: Cannot set Column 'DepartmentID' to be null. Please
use DBNull instead.
On this Line:
dsPasswordList.PasswordList.Rows(Me.BindingContext(dsPasswordList,
"PasswordList").Position).Item("DepartmentID") =
Me.cboPasswordListsDepartment.SelectedValue
Im so lost Has anybody got any ideas?
Many Thanks Again
MCN