Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Remote Connection While using Attached Database file in MssqlExpress 2005

Remote Connection While using Attached Database file in MssqlExpress 2005

Scheduled Pinned Locked Moved Visual Basic
csharpdatabasesql-server
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    r_mohd
    wrote on last edited by
    #1

    Hi All, Kindly suggest me how i use same database file from different Computers. i am using mssql express 2005 with vb.net. thanks

    rmshah Developer

    A W 2 Replies Last reply
    0
    • R r_mohd

      Hi All, Kindly suggest me how i use same database file from different Computers. i am using mssql express 2005 with vb.net. thanks

      rmshah Developer

      A Offline
      A Offline
      Ashutosh Phoujdar
      wrote on last edited by
      #2

      Please try these steps : 1. Put the database file (*.mdf) in shared location, and give Full Control to users Who will use connection e.g. ASPNET user or any machine user in case of windows application. 2. Then use following connection string : SqlConnection conn = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=;Integrated Security=True;Connect Timeout=30;User Instance=True"); 3. Although this may not recommended solution, but It works.

      dnpro "Very bad programmer"

      1 Reply Last reply
      0
      • R r_mohd

        Hi All, Kindly suggest me how i use same database file from different Computers. i am using mssql express 2005 with vb.net. thanks

        rmshah Developer

        W Offline
        W Offline
        Wendelius
        wrote on last edited by
        #3

        You don't actually use same database file. You install SQL Server on a computer, place your database in the SQL Server and applications will connect to the SQL Server (not the database file) using SqlConnection. For connection refer to: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlconnection.aspx[^]

        The need to optimize rises from a bad design.My articles[^]

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups