Liebe VBler,
ich habe ein Problem. Undzwar lässt sich mein Programm nicht mehr starten.
Immer bekomme ich den fehler "Ungültige Konvertierung von Typ DBNull in Typ Integer.
Kann mir jemand sagen, wie ich diesen Fehler ausbessere?
Hier noch anbei die Details der Fehlermeldung:
Spoiler anzeigen
ich habe ein Problem. Undzwar lässt sich mein Programm nicht mehr starten.
Immer bekomme ich den fehler "Ungültige Konvertierung von Typ DBNull in Typ Integer.
Kann mir jemand sagen, wie ich diesen Fehler ausbessere?
Hier noch anbei die Details der Fehlermeldung:
Informationen über das Aufrufen von JIT-Debuggen
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.
************** Ausnahmetext **************
System.InvalidCastException: Ungültige Konvertierung von Typ DBNull in Typ Integer.
bei Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(Object Value)
bei PräsentationsStick.Form1.OverlayPosition() in C:\Users\Christopher Menke\Desktop\Form1.vb:Zeile 685.
bei PräsentationsStick.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\Christopher Menke\Desktop\Form1.vb:Zeile 31.
bei System.Windows.Forms.Form.OnLoad(EventArgs e)
bei System.Windows.Forms.Form.SetVisibleCore(Boolean value)
bei System.Windows.Forms.Control.Show()
bei PräsentationsStick.SplashScreen1.SplashScreen1_Load(Object sender, EventArgs e) in C:\Users\Christopher Menke\Documents\Visual Studio 2010\Projects\PK Media Management Remote\PräsentationsStick\PräsentationsStick\SplashScreen1.vb:Zeile 11.
bei System.EventHandler.Invoke(Object sender, EventArgs e)
bei System.Windows.Forms.Form.OnLoad(EventArgs e)
bei System.Windows.Forms.Form.OnCreateControl()
bei System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
bei System.Windows.Forms.Control.CreateControl()
bei System.Windows.Forms.Control.WmShowWindow(Message& m)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei System.Windows.Forms.ContainerControl.WndProc(Message& m)
bei System.Windows.Forms.Form.WmShowWindow(Message& m)
bei System.Windows.Forms.Form.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Geladene Assemblys **************
mscorlib
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18034 built by: FX45RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll.
----------------------------------------
PräsentationsStick
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///C:/Users/Christopher%20Menke/Documents/Visual%20Studio%202010/Projects/PK%20Media%20Management%20Remote/Pr%C3%A4sentationsStick/Pr%C3%A4sentationsStick/bin/Debug/Pr%C3%A4sentationsStick.exe.
----------------------------------------
Microsoft.VisualBasic
Assembly-Version: 10.0.0.0.
Win32-Version: 11.0.50709.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll.
----------------------------------------
System
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18034 built by: FX45RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
System.Core
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll.
----------------------------------------
System.Windows.Forms
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18036 built by: FX45RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System.Drawing
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18021 built by: FX45RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
System.Runtime.Remoting
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll.
----------------------------------------
System.Data
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18034 built by: FX45RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll.
----------------------------------------
System.Xml
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18034 built by: FX45RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
AxInterop.WMPLib
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///C:/Users/Christopher%20Menke/Documents/Visual%20Studio%202010/Projects/PK%20Media%20Management%20Remote/Pr%C3%A4sentationsStick/Pr%C3%A4sentationsStick/bin/Debug/AxInterop.WMPLib.DLL.
----------------------------------------
Interop.WMPLib
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///C:/Users/Christopher%20Menke/Documents/Visual%20Studio%202010/Projects/PK%20Media%20Management%20Remote/Pr%C3%A4sentationsStick/Pr%C3%A4sentationsStick/bin/Debug/Interop.WMPLib.DLL.
----------------------------------------
System.Windows.Forms.resources
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------
System.Data.DataSetExtensions
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.DataSetExtensions/v4.0_4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll.
----------------------------------------
System.Numerics
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll.
----------------------------------------
mscorlib.resources
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll.
----------------------------------------
System.Configuration
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
----------------------------------------
Microsoft.VisualBasic.resources
Assembly-Version: 10.0.0.0.
Win32-Version: 11.0.50709.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic.resources/v4.0_10.0.0.0_de_b03f5f7f11d50a3a/Microsoft.VisualBasic.resources.dll.
----------------------------------------
************** JIT-Debuggen **************
Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
Konfigurationsdatei der Anwendung oder des Computers
(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.
Zum Beispiel:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
Ausnahmen an den JIT-Debugger gesendet, der auf dem
Computer registriert ist, und nicht in diesem Dialogfeld behandelt.
anstelle dieses Dialogfelds finden Sie am Ende dieser Meldung.
************** Ausnahmetext **************
System.InvalidCastException: Ungültige Konvertierung von Typ DBNull in Typ Integer.
bei Microsoft.VisualBasic.CompilerServices.Conversions.ToInteger(Object Value)
bei PräsentationsStick.Form1.OverlayPosition() in C:\Users\Christopher Menke\Desktop\Form1.vb:Zeile 685.
bei PräsentationsStick.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\Christopher Menke\Desktop\Form1.vb:Zeile 31.
bei System.Windows.Forms.Form.OnLoad(EventArgs e)
bei System.Windows.Forms.Form.SetVisibleCore(Boolean value)
bei System.Windows.Forms.Control.Show()
bei PräsentationsStick.SplashScreen1.SplashScreen1_Load(Object sender, EventArgs e) in C:\Users\Christopher Menke\Documents\Visual Studio 2010\Projects\PK Media Management Remote\PräsentationsStick\PräsentationsStick\SplashScreen1.vb:Zeile 11.
bei System.EventHandler.Invoke(Object sender, EventArgs e)
bei System.Windows.Forms.Form.OnLoad(EventArgs e)
bei System.Windows.Forms.Form.OnCreateControl()
bei System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
bei System.Windows.Forms.Control.CreateControl()
bei System.Windows.Forms.Control.WmShowWindow(Message& m)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)
bei System.Windows.Forms.ContainerControl.WndProc(Message& m)
bei System.Windows.Forms.Form.WmShowWindow(Message& m)
bei System.Windows.Forms.Form.WndProc(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
************** Geladene Assemblys **************
mscorlib
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18034 built by: FX45RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll.
----------------------------------------
PräsentationsStick
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///C:/Users/Christopher%20Menke/Documents/Visual%20Studio%202010/Projects/PK%20Media%20Management%20Remote/Pr%C3%A4sentationsStick/Pr%C3%A4sentationsStick/bin/Debug/Pr%C3%A4sentationsStick.exe.
----------------------------------------
Microsoft.VisualBasic
Assembly-Version: 10.0.0.0.
Win32-Version: 11.0.50709.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll.
----------------------------------------
System
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18034 built by: FX45RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll.
----------------------------------------
System.Core
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll.
----------------------------------------
System.Windows.Forms
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18036 built by: FX45RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll.
----------------------------------------
System.Drawing
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18021 built by: FX45RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll.
----------------------------------------
System.Runtime.Remoting
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Runtime.Remoting/v4.0_4.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll.
----------------------------------------
System.Data
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18034 built by: FX45RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll.
----------------------------------------
System.Xml
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.18034 built by: FX45RTMGDR.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll.
----------------------------------------
AxInterop.WMPLib
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///C:/Users/Christopher%20Menke/Documents/Visual%20Studio%202010/Projects/PK%20Media%20Management%20Remote/Pr%C3%A4sentationsStick/Pr%C3%A4sentationsStick/bin/Debug/AxInterop.WMPLib.DLL.
----------------------------------------
Interop.WMPLib
Assembly-Version: 1.0.0.0.
Win32-Version: 1.0.0.0.
CodeBase: file:///C:/Users/Christopher%20Menke/Documents/Visual%20Studio%202010/Projects/PK%20Media%20Management%20Remote/Pr%C3%A4sentationsStick/Pr%C3%A4sentationsStick/bin/Debug/Interop.WMPLib.DLL.
----------------------------------------
System.Windows.Forms.resources
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms.resources/v4.0_4.0.0.0_de_b77a5c561934e089/System.Windows.Forms.resources.dll.
----------------------------------------
System.Data.DataSetExtensions
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.DataSetExtensions/v4.0_4.0.0.0__b77a5c561934e089/System.Data.DataSetExtensions.dll.
----------------------------------------
System.Numerics
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll.
----------------------------------------
mscorlib.resources
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/mscorlib.resources/v4.0_4.0.0.0_de_b77a5c561934e089/mscorlib.resources.dll.
----------------------------------------
System.Configuration
Assembly-Version: 4.0.0.0.
Win32-Version: 4.0.30319.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll.
----------------------------------------
Microsoft.VisualBasic.resources
Assembly-Version: 10.0.0.0.
Win32-Version: 11.0.50709.17929 built by: FX45RTMREL.
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic.resources/v4.0_10.0.0.0_de_b03f5f7f11d50a3a/Microsoft.VisualBasic.resources.dll.
----------------------------------------
************** JIT-Debuggen **************
Um das JIT-Debuggen (Just-In-Time) zu aktivieren, muss in der
Konfigurationsdatei der Anwendung oder des Computers
(machine.config) der jitDebugging-Wert im Abschnitt system.windows.forms festgelegt werden.
Die Anwendung muss mit aktiviertem Debuggen kompiliert werden.
Zum Beispiel:
<configuration>
<system.windows.forms jitDebugging="true" />
</configuration>
Wenn das JIT-Debuggen aktiviert ist, werden alle nicht behandelten
Ausnahmen an den JIT-Debugger gesendet, der auf dem
Computer registriert ist, und nicht in diesem Dialogfeld behandelt.