Jedes Mal, wenn ich mein Programm starte und etwas in meine Datenbank einfüge, erhalte ich diesen Fehler oben. Nachstehend ist mein Code.Fehler empfangen, der besagt, dass "NullReferenceException unbehandelt wurde"
Cmd = new SqlCommand
(@"INSERT INTO FileArchive (FFile, FTitle, FDesc, FIssuer, FType, FFileName,FDatePassed, FDatestored, FStoredby, SBID)
VALUES
((SELECT * FROM Openrowset(BULK '" + txtFile.Text + "', SINGLE_BLOB) AS FFile),'" + txtTitle.Text + "', '" + txtDesc.Text + @"',
'" + txtIssuer.Text + "', '" + cbFileType.SelectedValue.ToString() + "', '" + txtFile.Text + "', '" + dtpDateP.Value.ToShortDateString() + @"',
'" + DateTime.Now.Date.ToShortDateString() + "', '" + sbsName.Text + @"',
(SELECT SBID from SBStaff where SBStaff.SBUser = '" + txtun.Text + "' and SBStaff.SBPass = '" + txtpw.Text + "'))", Con);
müssen Sie den Gesamtcode und die gesamte Fehlermeldung einfügen – TheGameiswar