S
Steve
Hi all
I have a form that is bound to a table in my strongly-typed dataset. When I
create a new record, I am using the following code:
With Me.BindingContext(m_oDataSet.SecUser)
.EndCurrentEdit()
.AddNew()
End With
Just before I update the data I use the following line, and on this line I
get an error:
Me.BindingContext(m_oDataSet.SecUser).EndCurrentEdit()
The error is that the UserID column in my table does not allow nulls. So,
After I call the AddNew method, how do I set the UserID column of the newly
created record? I'll set it to some randon figure as the DB is an IDENTITY
type, but I just need a reference to it to set it so my dataset is happy
based on it's own constraints.
Kind Regards,
Steve.
I have a form that is bound to a table in my strongly-typed dataset. When I
create a new record, I am using the following code:
With Me.BindingContext(m_oDataSet.SecUser)
.EndCurrentEdit()
.AddNew()
End With
Just before I update the data I use the following line, and on this line I
get an error:
Me.BindingContext(m_oDataSet.SecUser).EndCurrentEdit()
The error is that the UserID column in my table does not allow nulls. So,
After I call the AddNew method, how do I set the UserID column of the newly
created record? I'll set it to some randon figure as the DB is an IDENTITY
type, but I just need a reference to it to set it so my dataset is happy
based on it's own constraints.
Kind Regards,
Steve.