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]"
C# SqlDataAdapter Fill Komut hatası
1
●32