| | |
how to connect to a microsoft sql database?
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Apr 2009
Posts: 13
Reputation:
Solved Threads: 0
•
•
•
•
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!!
//
![]() |
Similar Threads
- How do you connect to a sql database using C# (C#)
- Database Connectivity in C (C)
- Remote sql database (ASP.NET)
- [B]How will I connect MS SQL to java?[/B] (MS SQL)
- can i know what software shall i use to connect jsp file to the database? (JSP)
- Connecting to database (VB.NET)
- Simple ASP.Net Login Page (Using VB.Net) (ASP.NET)
Other Threads in the C# Forum
- Previous Thread: Symmetric Vs Asymmetric Encryption
- Next Thread: ADO.NET ExecuteNonQuery Problem (Dashes in the string)
| Thread Tools | Search this Thread |
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# chat check checkbox client color combobox contorl control conversion csharp custom database datagrid datagridview dataset datetime degrees development draganddrop drawing encryption enum event excel file files form format forms function gdi+ httpwebrequest image index input install java label list listbox listener mandelbrot math mouseclick mysql networking object operator path photoshop picturebox pixelinversion post prime programming radians regex remote remoting richtextbox save saving serialization server sleep soap socket sql statistics stream string table tcp text textbox thread time timer treeview update usercontrol validation view visualstudio webbrowser windows winforms wpf xml





