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

Recommended Answers

All 3 Replies

What database server are you connecting to? It's likely that connectionstrings.com has a sample connection string for it.

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;"
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.