Hallo,
das funktioniert leider nicht.
Hier nochmals mein angepasster Code:
if not myDataReader(3) is nothing then
Datum(i) = myDataReader.getDateTime(3).Date
end if
Es kommt die folgende Fehlermeldung:
Data is Null. This method or property cannot be called on Null values.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.
Exception Details: System.Data.SqlTypes.SqlNullValueException: Data is
Null. This method or property cannot be called on Null values.
Source Error:
Line 74: Istzeit(i) = CInt(myDataReader.GetDouble(2)*10)
Line 75: if not myDataReader(3) is nothing then
Line 76: Datum(i) = myDataReader.getDateTime(3).Date
Line 77: end if
Line 78: i = i + 1
Also funktioniert die Abfangmethode nicht.
Gibt es sonst noch eine L�sung?
Gru� Ulli
"Reinhold Becker"
<[EMAIL PROTECTED]
t> An
Gesendet von: <[email protected]>
[EMAIL PROTECTED] Kopie
gamoi.com
Thema
AW: [Vb.net] Probleme beim
15.03.2005 15:59 Auslesen von leeren Feldern
Bitte antworten
an
[EMAIL PROTECTED]
com
Klar. Weil er versucht, null in ein Double zu konvertieren.
IF not myDataReader(2) is nothing then
Istzeit(i) = CInt(myDataReader.GetDouble(2)*10)
End if
-----Urspr�ngliche Nachricht-----
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von [EMAIL PROTECTED]
Gesendet: Dienstag, 15. M�rz 2005 15:52
An: [email protected]
Betreff: [Vb.net] Probleme beim Auslesen von leeren Feldern
Hallo,
ich habe ein Problem beim Auslesen von Feldern aus einer MS SQL 2000 - DB.
Und zwar st�rtzt mein Script immer ab, wenn in einem Feld nichts drin
steht.
Istzeit(i) = CInt(myDataReader.GetDouble(2)*10)
Gibt es eine M�glichkeit, diesen Umstand abzufangen?
Vielen Dank schon mal.
Gru� Ulli
**********************************************************************
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the system manager.
**********************************************************************
_______________________________________________
Vb.net Mailingliste, Postings senden an:
[email protected]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/vb.net
_______________________________________________
Vb.net Mailingliste, Postings senden an:
[email protected]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/vb.net
_______________________________________________
Vb.net Mailingliste, Postings senden an:
[email protected]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/vb.net