• 06-05-2021, 18:51:28
    #1
    Arkadaşlar merhaba yeni yeni bir şeyler öğrenmeye çalışıyorum fakat bu hatayı bir türlü aşamadım .


    birclass içerisinde sql bağlantısı yaptım


    public SqlConnection baglanti()
    {
    SqlConnection baglan = new SqlConnection(@"Data Source=monster\deneme;Initial Catalog=deneme;Integrated Security=True");
    baglan.Open();
    return baglan;

    daha sonra grid yazdırmak istedim fakat sorun oldu


    sqlbaglantisi bgl = new sqlbaglantisi();
    void listele ()
    {
    DataTable dt = new DataTable();
    SqlDataAdapter da = new SqlDataAdapter("Selecet * From TBL_URUNLER", bgl.baglanti());
    da.Fill(dt);
    gridControl1.DataSource = dt;
    }
    private void FrmUrunler_Load(object sender, EventArgs e)
    {
    listele();


    Hata mesajım


    "Debugger:Exception Intercepted: listele, FrmUrunler.cs line 71
    An exception was intercepted and the call stack unwound to the point before the call from user code where the exception occurred. "Unwind the call stack on unhandled exceptions" is selected in the debugger options.
    Time: 6.05.2021 18:51:00
    Thread:<No Name>[12192]"
  • 19-05-2021, 23:59:03
    #2
    Kimlik doğrulama veya yönetimden onay bekliyor.
    Hocam bilmiyorum sorunu çözdünüz mü fakat tanımladığınız metodu public yapmamışsınız. Muhtemelen bu sebeple alıyorsunuz hatayı. Sorun görünmüyor kodlarda.

    public void listele ()