How to use a sql server database on LAN network using VB 2008

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dheerloveguru
    New Member
    • Jan 2012
    • 11

    How to use a sql server database on LAN network using VB 2008

    Hi, could anyone help me....

    I've already installed VB and sql server express 2008. I've created a database in the sql server and connected the database to VB project which works fine. My problem is... how to use this VB project on a LAN network. If I complete the project using the database which is on my hard drive, how Could I build this project and put it on the network, so as other users using the project to update the database.

    Pls guide or refer me to any site where I could continue working on the project.
  • PsychoCoder
    Recognized Expert Contributor
    • Jul 2010
    • 465

    #2
    Going that route I would check out SQL Compact. You can embed the database into your application.

    Comment

    • dheerloveguru
      New Member
      • Jan 2012
      • 11

      #3
      Thanks bro for replying but how the can each user connected to that project and update the database. I've copied the database to the folder and share the project folder on the LAN... the forms are load but not the data from the database. One main thng I've installed sql server only on my pc and not on others....

      Comment

      • PsychoCoder
        Recognized Expert Contributor
        • Jul 2010
        • 465

        #4
        If you're wanting multiple users to connect to the same DB then you're going to need a hosted SQL database

        Comment

        • dheerloveguru
          New Member
          • Jan 2012
          • 11

          #5
          How to use a hosted SQl Database on a LAN Network????

          Comment

          • lyodmichael
            New Member
            • Jul 2012
            • 75

            #6
            use your connection string and set the right hosted, hmm.

            Data Source=myServer Address;Databas e=myDataBase;Us er ID=myUsername;P assword=myPassw ord;

            just like that if im not mistaken .

            Comment

            • dheerloveguru
              New Member
              • Jan 2012
              • 11

              #7
              I've done as u said, when I ran it from my computer it works but after building the project. I launched the Vb Application on another computer found on the network, the connection string failed to response. my connection string is like that:
              Dim connetionString As String
              Dim cnn As SqlConnection
              connetionString = "Data Source=.\SQLEXP RESS;AttachDbFi lename=C:\DBMS_ DataSource\DBMS _Database.mdf;I ntegrated Security=True;C onnect Timeout=30;User Instance=True"
              cnn = New SqlConnection(c onnetionString)
              Try
              cnn.Open()
              MsgBox("Connect ion Open ! ")
              cnn.Close()
              Catch ex As Exception
              MsgBox("Can not open connection ! ")
              End Try

              The question is how other computers on the network will locate my computer database location???

              Pls any suggestion....

              Comment

              Working...