• 22-10-2016, 16:42:10
    #1
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Merhaba arkadaşlar sitemizde kullanıcı, ürün v.s. ekleme çıkarma işlemi yapamıyoruz. Site sql e bağlanıyor panele giriyoruz ancak herhangi bir işlem yapamıyoruz. Konu ile ilgili yardımcı olabilir misiniz?

    Örnek hata :

    Server Error in '/' Application.
    
    Cannot insert the value NULL into column 'id', table '******_db.*****_us.yonetim'; column does not allow nulls. INSERT fails.
    The statement has been terminated.
    
    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.SqlClient.SqlException: Cannot insert the value NULL into column 'id', table '******1_db.*****1_us.yonetim'; column does not allow nulls. INSERT fails.
    The statement has been terminated.
    
    Source Error: 
    
    
    Line 54:         cmd.Parameters.Add("ad", TextBox3.Text);
    Line 55:         cmd.Parameters.Add("soyad", TextBox4.Text);
    Line 56:         cmd.ExecuteNonQuery();
    Line 57:         Response.Write("Kullanıcı Başarıyla Eklendi");
    Line 58:         Response.Redirect("kullanicilar.aspx");
    
    Source File: w:\inetpub\vhosts\******.com\httpdocs\panel\kullanicilar.aspx.cs    Line: 56 
    
    Stack Trace: 
    
    
    [SqlException (0x80131904): Cannot insert the value NULL into column 'id', table '*****1_db.******1_us.yonetim'; column does not allow nulls. INSERT fails.
    The statement has been terminated.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +1787814
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5341674
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +546
       System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +1693
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +275
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) +1421
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite) +177
       System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite) +208
       System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +163
       yonetim_kullanicilar.Button2_Click(Object sender, EventArgs e) in w:\inetpub\vhosts\********.com\httpdocs\panel\kullanicilar.aspx.cs:56
       System.Web.UI.WebControls.Button.OnClick(EventArgs e) +9628442
       System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +103
       System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
       System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
       System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +35
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
  • 22-10-2016, 19:16:24
    #2
    Alıntı
    [SqlException (0x80131904): Cannot insert the value NULL into column 'id', table '*****1_db.******1_us.yonetim'; column does not allow nulls. INSERT fails.
    Gelen Parametre içerisinde column 'id' Boş gelmemeli diyor.
    Otomatik id tanımlayın yada insert işlemi esnasında 1 değerini gönderin.

    Otomatik ID tanımlamak için tabloyu düzenle yaptıktan sonra id sutununa gelip Identiy aktif hale getirin.

  • 24-10-2016, 13:22:33
    #3
    Üyeliği durduruldu
    SanalTurkey adlı üyeden alıntı: mesajı görüntüle
    Gelen Parametre içerisinde column 'id' Boş gelmemeli diyor.
    Otomatik id tanımlayın yada insert işlemi esnasında 1 değerini gönderin.

    Otomatik ID tanımlamak için tabloyu düzenle yaptıktan sonra id sutununa gelip Identiy aktif hale getirin.

    Çok teşekkür ederim. Sayenizde düzelttik sorunu.