Hallo Community
Ich habe eine Datenbank und baue ein Programm dafür. Ich bin gerade daran die Textboxen zu füllen. Leider gibt es NULL Werte in der Datenbank.
Ich habe auf verschiedenste Weise abzufragen, ob einer dieser Werte NULL ist.
Ich habe es mit
Ich weiss, das es mit einem = eine Exception gibt.
Bei den anderen, komme ich in mein TryCatch und gibt einen Exception aus:
Es heisst auch, dass ich DBNull nicht in ein String konvertieren kann, aber das mache ich in meiner Abfrage nicht.
Es ist für mich total unverständlich.
Ich habe eine Datenbank und baue ein Programm dafür. Ich bin gerade daran die Textboxen zu füllen. Leider gibt es NULL Werte in der Datenbank.
Ich habe auf verschiedenste Weise abzufragen, ob einer dieser Werte NULL ist.
Ich habe es mit
IsDBNull(Feld)
, Feld Is DBNull
, Feld Is DBNull.Value
, Feld = DBNull
und Feld = DBNull.Value
versucht.Ich weiss, das es mit einem = eine Exception gibt.
Bei den anderen, komme ich in mein TryCatch und gibt einen Exception aus:
Es heisst auch, dass ich DBNull nicht in ein String konvertieren kann, aber das mache ich in meiner Abfrage nicht.
Es ist für mich total unverständlich.
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „a.b_om“ ()