Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object cannot be cast from DBNull to other types.
Message
De
01/04/2005 01:44:17
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Object cannot be cast from DBNull to other types.
Divers
Thread ID:
01000527
Message ID:
01000527
Vues:
129
I am getting the above error when I click the new button from the maintenance form and it is changing focus to the properties tab.

The table has no data in it right now.

If I manually ad a record to the table and then go back into the maintenance form, I can see the record in the grid but when I hit the new button, the properties tab comes up but with the data in the grid and never gives me a blank sheet to work with on entering a new record.

Any ideas on what is going on or what I am missing?

I have copied the entire error below:

Object cannot be cast from DBNull to other types.
at System.Windows.Forms.Control.SetVisibleCore(Boolean value)
at System.Windows.Forms.Control.set_Visible(Boolean value)
at System.Windows.Forms.TabPage.set_Visible(Boolean value)
at System.Windows.Forms.TabControl.UpdateTabSelection(Boolean uiselected)
at System.Windows.Forms.TabControl.OnSelectedIndexChanged(EventArgs e)
at System.Windows.Forms.TabControl.set_SelectedIndex(Int32 value)
at System.Windows.Forms.TabControl.set_SelectedTabInternal(TabPage value)
at System.Windows.Forms.TabControl.set_SelectedTab(TabPage value)
at OakLeaf.MM.Main.Windows.Forms.mmBaseForm.SetFocus(Control cntrl)
at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.NewRow(mmBusinessObject bizObj, String tableName, Object defaultValues)
at OakLeaf.MM.Main.Windows.Forms.mmBusinessForm.NewRow(mmBusinessObject bizObj, String tableName)
at OakLeaf.MM.Main.Windows.Forms.mmButtonHelper.NewHandler(Object button, String bindingSource, String bindingSourceMember, mmBaseBusinessObject& bizObj)
at OakLeaf.MM.Main.Windows.Forms.mmButtonNew.mmButtonNew_Click(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
at System.Windows.Forms.Control.WmCommand(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.NativeWindow.DefWndProc(Message& m)
at System.Windows.Forms.Control.DefWndProc(Message& m)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at EagleSummit.CampSummit.Main.AppMainEntry.Main() in C:\Visual Studio Projects\CampSummit\CampSummit\Main.cs:line 45
Patrick L. Stovall
Senior Architect/Developer
MCP - C#

VeroQuest
P.O.Box 7216
Kalispell, MT 59904
Répondre
Fil
Voir

Click here to load this message in the networking platform