G
Guest
Hi everybody,
I create a form with textboxes for display and data entry. I used
bindingnavigator and bindingsource to make
that happen, but having problems with adding new record...I finally
successfully added new record in dsProducts
and in the bindingnavigator shows correct number of records..But when I
clicked any navigation controls. It
displays an error message of:
Column 'ProductId' does not allow nulls.
and data is not save in the database also even I used the
dataadapter.Update(dataset)...
Is there anyone who knows to solve this?? Thanks.
Main Program:
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new BindedControlsForm());
}
Inside Save Button Click:
this.Validate();
this.BindingContext[dsProducts.Products.DefaultView].EndCurrentEdit();
this.dsProducts.AcceptChanges();
den2005
I create a form with textboxes for display and data entry. I used
bindingnavigator and bindingsource to make
that happen, but having problems with adding new record...I finally
successfully added new record in dsProducts
and in the bindingnavigator shows correct number of records..But when I
clicked any navigation controls. It
displays an error message of:
Column 'ProductId' does not allow nulls.
and data is not save in the database also even I used the
dataadapter.Update(dataset)...
Is there anyone who knows to solve this?? Thanks.
Main Program:
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new BindedControlsForm());
}
Inside Save Button Click:
this.Validate();
this.BindingContext[dsProducts.Products.DefaultView].EndCurrentEdit();
this.dsProducts.AcceptChanges();
den2005