Please I am now making a project using C# and I want to connect to a database how to do this using visual studio 6?
Thanks

Please I am now making a project using C# and I want to connect to a database how to do this using visual studio 6?
Thanks

hi..
you can make use of the connectionstring as shown below:

string str = "Data Source=*name of your SQL server*;Initial Catalog=*your database name*;Integrated Security=True";

SqlConnection cn = new SqlConnection(str);

string query="your query statement";
cn.Open();
//
rest of the code!!
//

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.