-4
Programımı her çalıştırdığımda ve veritabanıma bir şey eklemeye başladığımda, bu hatayı yukarıda aldığımdan .Below benim kodumdur."NullReferenceException işe yaramadı" hatası alıyor
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);
Toplam kodu ve toplam hata mesajını yapıştırmanız gerekiyor – TheGameiswar