none
connect same application from different computer to same database?

    Question

  • Hi,

    is it possible to allow different desktop with same window application to connect to a same sql server?

    after setting up the sql server with browser capability. how do i do that? just like normal connecting?

    or is it not possible?

    Thursday, July 04, 2013 10:30 AM

Answers

  • according to 

    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c0b8d5ce-ae53-44a1-834e-0674667c416a/connect-to-sql-server-from-other-computer

    i just have to put in sql instance as usual.

    but after i put in, i still cant connect. but when i open sql management from pc2 i am ablet o remotly connect with same instance name i use in my code.

    is there anything else that i need to do?

    i already switch on tcp and browser

    this is my code

     Try
            
                Dim con As String = " Provider=SQLNCLI11;Server=" & TextBox1.Text & ";Database=EleapSQL;Integrated Security=SSPI;DataTypeCompatibility=80;User ID=" & TextBox2.Text & ";Password=" & TextBox3.Text & ";MultipleActiveResultSets=True"
                Dim connection As New ADODB.Connection
                connection.ConnectionString = con
                connection.Open()
                If connection.State = ConnectionState.Open Then
                    Button1.BackColor = Color.Green
                    Button1.Text = "Valid connection"
                Else
                    Button1.BackColor = Color.Red
                    Button1.Text = "Invalid connection"
                End If
                connection.Close()
            Catch ex As Exception
                Button1.BackColor = Color.Red
                Button1.Text = "Invalid connection"
            End Try

    what i entered from PC2 was 

    myservername

    user and pass

    i also tried pointing to the server ip

    192.168.xx.xx\myservername

    user and pass

    both cant work

    • Edited by CSNewbie Friday, July 05, 2013 2:22 AM add more info
    • Marked as answer by CSNewbie Friday, July 05, 2013 6:34 AM
    Friday, July 05, 2013 2:16 AM

All replies

  • In regards to allowing a windows application (on one or more computers) to connect to a SQL-Server database, there is nothing that prevents this. Same goes for one computer with multiple user accounts (thus each one having it's own desktop).

    For browser information in regards to SQL-Server ask here

    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?forum=sqlgetstarted


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem.

    Thursday, July 04, 2013 10:43 AM
  • according to 

    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c0b8d5ce-ae53-44a1-834e-0674667c416a/connect-to-sql-server-from-other-computer

    i just have to put in sql instance as usual.

    but after i put in, i still cant connect. but when i open sql management from pc2 i am ablet o remotly connect with same instance name i use in my code.

    is there anything else that i need to do?

    i already switch on tcp and browser

    this is my code

     Try
            
                Dim con As String = " Provider=SQLNCLI11;Server=" & TextBox1.Text & ";Database=EleapSQL;Integrated Security=SSPI;DataTypeCompatibility=80;User ID=" & TextBox2.Text & ";Password=" & TextBox3.Text & ";MultipleActiveResultSets=True"
                Dim connection As New ADODB.Connection
                connection.ConnectionString = con
                connection.Open()
                If connection.State = ConnectionState.Open Then
                    Button1.BackColor = Color.Green
                    Button1.Text = "Valid connection"
                Else
                    Button1.BackColor = Color.Red
                    Button1.Text = "Invalid connection"
                End If
                connection.Close()
            Catch ex As Exception
                Button1.BackColor = Color.Red
                Button1.Text = "Invalid connection"
            End Try

    what i entered from PC2 was 

    myservername

    user and pass

    i also tried pointing to the server ip

    192.168.xx.xx\myservername

    user and pass

    both cant work

    • Edited by CSNewbie Friday, July 05, 2013 2:22 AM add more info
    • Marked as answer by CSNewbie Friday, July 05, 2013 6:34 AM
    Friday, July 05, 2013 2:16 AM
  • solved

    closed

    Friday, July 05, 2013 6:34 AM