0

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

3
Contributors
3
Replies
22
Views
3 Years
Discussion Span
Last Post by gusano79
0

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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.