
14/05/2009, 12:45
|
| | Fecha de Ingreso: abril-2009
Mensajes: 32
Antigüedad: 15 años, 11 meses Puntos: 0 | |
Respuesta: BindingNavigator y controlar campo nulos Ya estoy aki, efectivamente el valor de ups.Mensaje no tiene nada raro: "El campo DNI no puede ser nulo\r\nEl campo Categoría no puede ser nulo\r\nEl campo Nombre no puede ser nulo\r\nEl campo Apellidos no puede ser nulo\r\nEl campo Dirección no puede ser nulo\r\nEl campo Código Postal no puede ser nulo\r\nEl campo Población no puede ser nulo\r\nEl campo Provincia no puede ser nulo\r\nEl campo Forma de Pago no puede ser nulo\r\n"
Os pego la traza de la excepción auqnue no dice gran cosa, la línea 113 de FrmEmpleados.cs es la del messageBox. Cita: No se controló System.Data.NoNullAllowedException
Message="La columna 'dni' no permite tener valores nulos."
Source="System.Data"
StackTrace:
en System.Data.DataColumn.CheckNullable(DataRow row)
en System.Data.DataColumn.CheckColumnConstraint(DataR ow row, DataRowAction action)
en System.Data.DataTable.RaiseRowChanging(DataRowChan geEventArgs args, DataRow eRow, DataRowAction eAction, Boolean fireEvent)
en System.Data.DataTable.SetNewRecordWorker(DataRow row, Int32 proposedRecord, DataRowAction action, Boolean isInMerge, Int32 position, Boolean fireEvent, Exception& deferredException)
en System.Data.DataTable.InsertRow(DataRow row, Int32 proposedID, Int32 pos, Boolean fireEvent)
en System.Data.DataView.FinishAddNew(Boolean success)
en System.Data.DataRowView.EndEdit()
en System.Windows.Forms.CurrencyManager.EndCurrentEdi t()
en System.Windows.Forms.CurrencyManager.ChangeRecordS tate(Int32 newPosition, Boolean validating, Boolean endCurrentEdit, Boolean firePositionChange, Boolean pullData)
en System.Windows.Forms.CurrencyManager.set_Position( Int32 value)
en System.Windows.Forms.ListBox.OnSelectedIndexChange d(EventArgs e)
en System.Windows.Forms.ListBox.WmReflectCommand(Mess age& m)
en System.Windows.Forms.ListBox.WndProc(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
en System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
en System.Windows.Forms.UnsafeNativeMethods.SendMessa ge(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
en System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
en System.Windows.Forms.Control.ReflectMessageInterna l(IntPtr hWnd, Message& m)
en System.Windows.Forms.Control.WmCommand(Message& m)
en System.Windows.Forms.Control.WndProc(Message& m)
en System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
en System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
en System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
en System.Windows.Forms.UnsafeNativeMethods.CallWindo wProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
en System.Windows.Forms.NativeWindow.DefWndProc(Messa ge& m)
en System.Windows.Forms.Control.DefWndProc(Message& m)
en System.Windows.Forms.Control.WmKillFocus(Message& m)
en System.Windows.Forms.Control.WndProc(Message& m)
en System.Windows.Forms.ListBox.WndProc(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
en System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
en System.Windows.Forms.SafeNativeMethods.MessageBox( HandleRef hWnd, String text, String caption, Int32 type)
en System.Windows.Forms.MessageBox.ShowCore(IWin32Win dow owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp)
en System.Windows.Forms.MessageBox.Show(String text, String caption)
en ServyGuar.Empleados.FrmEmpleados.lista_Click(Objec t sender, EventArgs e) en D:\Trabajos\SERVyGUARD\Aplicacion\ServyGuar\ServyG uar\Empleados\FrmEmpleados.cs:línea 113
en System.Windows.Forms.Control.OnClick(EventArgs e)
en System.Windows.Forms.ListBox.WndProc(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
en System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
en System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
en System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
en System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
en System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32 reason, ApplicationContext context)
en System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32 reason, ApplicationContext context)
en System.Windows.Forms.Application.Run(Form mainForm)
en ServyGuar.Program.Main() en D:\Trabajos\SERVyGUARD\Aplicacion\ServyGuar\ServyG uar\Program.cs:línea 18
en System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
en System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
en Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
en System.Threading.ThreadHelper.ThreadStart_Context( Object state)
en System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
en System.Threading.ThreadHelper.ThreadStart()
InnerException: |