Re: CommandBuilder bringt Fehlermeldung!



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
.



Relevant Pages

  • Unable to Write to Event Log w/ Enterprise Library 2.0 in Win App
    ... ExceptionPolicy.HandleException(ex, "Sample Exception Policy") ... keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, ... configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, ... context, String name, IConfigurationSource configurationSource, ...
    (microsoft.public.dotnet.general)
  • Re: urgent: beta 2.0 error
    ... Microsoft Online Support ... An unhandled exception has occurred. ... |> | Request URL: ... Boolean& ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Sharepoint 2007 - Installation Error - Failed to register SP servi
    ... The issue stems from the installer going to a remote computer for SQL Server. ... Server I have the following exception: ... exception, Boolean breakConnection) ... RunBehavior runBehavior, String resetOptionsString) ...
    (microsoft.public.sharepoint.portalserver)
  • SerializationException from Orchestration
    ... Exception type: ServiceCreationException ... Microsoft.BizTalk.XLANGs.BTXEngine.BTXSession._createOrRehydrateRealService(Guid& instanceId, IBTMessage currMsg) ... md, Objectargs, Object server, Int32 methodPtr, Boolean fExecuteInContext, ... serviceId, Guid& instanceId, BTXServiceStaticState staticState) ...
    (microsoft.public.biztalk.general)
  • Unable to Write to EventLog w/ Enterprise Libary 2.0
    ... ExceptionPolicy.HandleException(ex, "Sample Exception Policy") ... keys, SectionInput input, Boolean isTrusted, FactoryRecord factoryRecord, ... configKey, Boolean getLkg, Boolean checkPermission, Boolean getRuntimeObject, ... context, String name, IConfigurationSource configurationSource, ...
    (microsoft.public.vb.general.discussion)