i want to connect SQL server in C# application plz help how can i Connect DB in C#???
umair125 -20 Newbie Poster
Recommended Answers
Jump to Post>how can i Connect DB in C#???
Learn the basics of ADO.NET provider classes.
Jump to Post1-import the nameSpace
using System.Data.SqlClient
2- Make a new object from SqlConnection Class
SqlConnection conn = new SqlConnection();
3- set the ConnectionString property of the SqlConnection;
string connString = @"Data Source=ServerName;Initial Catalog=DataBaseName;Integrated Security=True";
set Integrated Security=True if you will use Windows …
All 6 Replies
kvprajapati 1,826 Posting Genius Team Colleague
GuitarComet 0 Light Poster

m.a.u.
mahmoud_wow 1 Newbie Poster
pauldani -2 Light Poster
avirag 10 Posting Whiz
kvprajapati commented: Good suggeston. +6
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.