i want to access (Add, Delete, Update) data through lan (local area network)using vb.net
looking for the connection string to access the same.
Saurav

For the SERVERNAME you will have to find out what it is from the net admin person/people. Assuming active directory, there will be a name mapped to the server IP address. Assuming MS SQL, three connection types are ADO, SqlClient (preferred) and OleDb. To connect to the PUBS database on a server named .\SQLEXPRESS (my local SQL server) you can use

Dim server As String = ".\SQLEXPRESS"
Dim db As String = "PUBS"

Dim adostr As String = "Driver={SQL Server};"     _
                     & "Server="   & server & ";" _
                     & "Database=" & db     & ";" _
                     & "Trusted_Connection=yes;"

Dim olestr As String = "Provider=SQLNCLI10;"      _
                     & "Server="   & server & ";" _
                     & "Database=" & db     & ";" _
                     & "Trusted_Connection=Yes;"

Dim sqlstr As String = "Server="   & server & ";" _
                     & "Database=" & db     & ";" _
                     & "Trusted_Connection=yes;"
This article has been dead for over six months. Start a new discussion instead.