Re: CommandBuilder bringt Fehlermeldung!
- From: Jens Greeb <Info@xxxxxxxxxxxx>
- Date: Mon, 28 Nov 2005 21:55:10 +0100
Frank Dzaebel schrieb:
Hallo Jens,
Wie kann ich die InnerExcepion oder die DB-spezifische Errors-Auflistung abrufen?
... catch (Exception ex)
Für die OleDb-Provider also z.B. Access-DB ist hier ein Beispiel, wie man die Errors-Auflistung abruft:
[OleDbException Class]
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfsystemdataoledboledbexceptionclasstopic.asp
catch (Exception ex)
Einfach die InnerException von 'ex' aufrufen, z.B. : catch (Exception ex) { if (ex.InnerException != null) MessageBox.Show(ex.InnerException.Message) }
[Exception.InnerException-Eigenschaft]
http://msdn.microsoft.com/library/DEU/cpref/html/frlrfsystemexceptionclassinnerexceptiontopic.asp
ciao Frank
Okay,
hier der Fehler:
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="Vokabeltrainer 2006"
StackTrace:
at Vokabeltrainer_2006.Form1.tbWort2_Leave(Object sender, EventArgs e) in E:\Eigene Dateien\Visual Studio 2005\Projects\Vokabeltrainer 2006\Vokabeltrainer 2006\Form1.cs:line 269
at System.Windows.Forms.Control.OnLeave(EventArgs e)
at System.Windows.Forms.Control.NotifyLeave()
at System.Windows.Forms.ContainerControl.UpdateFocusedControl()
at System.Windows.Forms.ContainerControl.AssignActiveControlInternal(Control value)
at System.Windows.Forms.ContainerControl.ActivateControlInternal(Control control, Boolean originator)
at System.Windows.Forms.ContainerControl.SetActiveControlInternal(Control value)
at System.Windows.Forms.ContainerControl.SetActiveControl(Control ctl)
at System.Windows.Forms.ContainerControl.set_ActiveControl(Control value)
at System.Windows.Forms.Control.Select(Boolean directed, Boolean forward)
at System.Windows.Forms.Control.SelectNextControl(Control ctl, Boolean forward, Boolean tabStopOnly, Boolean nested, Boolean wrap)
at System.Windows.Forms.Form.ProcessTabKey(Boolean forward)
at System.Windows.Forms.ContainerControl.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Form.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.TextBoxBase.ProcessDialogKey(Keys keyData)
at System.Windows.Forms.Control.PreProcessMessage(Message& msg)
at System.Windows.Forms.Control.PreProcessControlMessageInternal(Control target, Message& msg)
at System.Windows.Forms.Application.ThreadContext.PreTranslateMessage(MSG& msg)
at System.Windows.Forms.Application.ThreadContext.System.Windows.Forms.UnsafeNativeMethods.IMsoComponent.FPreTranslateMessage(MSG& msg)
at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(Form mainForm)
at Vokabeltrainer_2006.Program.Main() in E:\Eigene Dateien\Visual Studio 2005\Projects\Vokabeltrainer 2006\Vokabeltrainer 2006\Program.cs:line 17
at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
Ich hoffe, Du kannst damit was anfangen.
Gruß Jens .
- Follow-Ups:
- Re: CommandBuilder bringt Fehlermeldung!
- From: Frank Dzaebel
- Re: CommandBuilder bringt Fehlermeldung!
- References:
- Re: CommandBuilder bringt Fehlermeldung!
- From: Frank Dzaebel
- Re: CommandBuilder bringt Fehlermeldung!
- From: Jens Greeb
- Re: CommandBuilder bringt Fehlermeldung!
- From: Frank Dzaebel
- Re: CommandBuilder bringt Fehlermeldung!
- Prev by Date: Re: [MDI] Kommunikation Child <-> Parent
- Next by Date: Registrierungs-Popup deaktivieren...
- Previous by thread: Re: CommandBuilder bringt Fehlermeldung!
- Next by thread: Re: CommandBuilder bringt Fehlermeldung!
- Index(es):
Relevant Pages
|