C# ile Microsoft SQL Server Management Studio 18 arasında bağlantı hatası aliyorum.
Fomra giriş ve kayıt olma ozelliği ekledim veri tabanını yapiyorum, ne yazik ki veri cekmek icin hata aliyorum.
Yaptıklarım;
Calıştırdan services.msc yazarak hizmetlerden SQL serveri bulmaktı. Normal de calışıyor ama ben durdurup tekrar calıştırdım sorun cozulmedi.
Vereceğim linkteki tum adımları teker teker denedim sorun yine cozulmedi. Link
Aşağıya aldığım hataların fotoğraflarını atiyorum.
[CODE title="C# SQL"]using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient; //SQL Kutuphanesi
namespace SQL2
private void Form1_Load(object sender, EventArgs e)
bool isThere;
private void button1_Click(object sender, EventArgs e)
else
}
if (isThere)
else
}
}
}
[/CODE]
[CODE title="C# Sql başka kod"]using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient; //SQL Bağlantısı icin gerek kod.
namespace Admin_Panel_Girişi
static string constring = ("Data Source=DESKTOP-MTQ3JK4\Durdu;Initial Catalog=Kisiler;Integrated Security=True"); // SQL Veri Yolu.
SqlConnection connect = new SqlConnection(constring); //SQL Bağlantı Kodu.
private void button1_Click(object sender, EventArgs e)
private void button2_Click(object sender, EventArgs e)
try // Uye Olma Panel Kısım Ayarlamaları.
catch (Exception hata)
if (kadi.Text == "") //Textbox Boş Gecilemez Kodu.
if (adsoyad.Text == "") //Textbox Boş Gecilemez Kodu.
if (eposta.Text == "") //Textbox Boş Gecilemez Kodu.
}
[/CODE]