TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Orhan SALUR
NA
49
23.6k
how can i connect to database?
May 4 2015 6:58 PM
static void sqlVeriSorgulama()
{
//string komut;
try
{
SqlConnection baglanti = new SqlConnection();
baglanti.ConnectionString = "Data Source = COMPUTER1; database =NORTHWND; integrated security = true";
baglanti.Open();
SqlCommand komutSatiri = new SqlCommand("select top 1 * from Products order by UnitsInStock desc", baglanti);
komutSatiri.ExecuteNonQuery();
Console.WriteLine(komutSatiri.ToString());
komutSatiri.ToString();
Console.WriteLine("basarili");
baglanti.Close();
}
catch (Exception )
{
Console.WriteLine("hata olustu");
}
}
Reply
Answers (
4
)
merge two or more xml files
How to get crystal report path in c# windows application ?