How to connect microsift sql server 2005 using microsoft vb.net
.NET (Core and Framework)
3
Posts
3
Posters
0
Views
1
Watching
-
e.g.,
string connstring = "Data Source = .\\ABC;Initial Catalog = XYZ; Integrated Security = True";
SqlConnection conn = new SqlConnection(connstring); SqlCommand comm = new SqlCommand(); comm.CommandText = "Select \* From DummyTable"; comm.Connection = conn; conn.Open(); comm.ExecuteScalar(); conn.Close();
-
There is not just one or two ways to do this. I highly suggest picking up a book on ADO.NET to have as a learning tool and reference.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008