Data Platform Developer Center > Data Platform Development Forums > ADO.NET DataSet > Running the prog in a network environment
Ask a questionAsk a question
 

QuestionRunning the prog in a network environment

  • Tuesday, November 03, 2009 3:02 PMWasekMajlis Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Every one,

       If any one can help, I made a programme for my org in a simple form. Basically I used my data base as mdf in Bisual Studio 2008. Which operates in a stand alone computer. Now I am in a situation that I need to run the prog in a network.  When I tried to make the prog using SQL data base it only operates in the computer where it is built. whenever I load it to any other computer it says it could not find the database it requires. It will be appriciated if any one can give a easy solution to the problem.

    Thanks in advance

All Replies

  • Tuesday, November 03, 2009 4:14 PMMichael Aspengren - MSFT Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Probably one of these 3

    - Make sure Remote Connections are enabled.
      "How to: Check and Set Remote Server Connection Options (SQL Server Management Studio)"
      http://msdn.microsoft.com/en-us/library/ms179383.aspx

    - Make sure firewall is setup correctly.
      "How to: Configure a Windows Firewall for Database Engine Access"
      http://msdn.microsoft.com/en-us/library/ms175043.aspx

    - Make sure SQLBrowser service is running, otherwise only IP address will work.
      "SQL Server Browser Service"
      http://msdn.microsoft.com/en-us/library/ms181087.aspx

    HTH
    //Michael


    This posting is provided "AS IS" with no warranties.
  • Wednesday, November 04, 2009 1:11 PMWasekMajlis Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Michaele,

       You have given me some links to find solution to my problem. It is difficult for me to comprehend as I am new to this business. Let me explain my situation what I have done. I used Visual Studio 2008. Initially, I made a database using SQLExpress which was like this .\SQLEXPRESS, the connection String is shown below, then I made the Data table and built my software name "Air Crew DataBase" I Deployed,  took it to another computer and installed. While running it does not get the database to show.  Afterwards I changed the database to local database as "mdf" which I am able to run installing in different computers but, in every computer I have to insert new record seperately.  My requirement is can you give me any kind of suggestion though which I can operate my software having the same database in 3-4 different computers in a network. Which means I don't want to individually insert the same records in  defferent computers to show.  Help will be appritiated. Thanks

    Wasek

    This is in SQL DataBase

    wasek\sqlexpress.AirCrewDatabase.dbo
    Data Source=.\SQLEXPRESS;Initial Catalog=AirCrewDatabase;Integrated Security=True;Pooling=False

    Below is built in Local database

    BSRVehDatabase.mdf
    Data Source=.\SQLEXPRESS;AttachDbFilename=E:\VB2008Practice\BSR_MT\BSR_MT\BSR_MT\BSRVehDatabase.mdf;Integrated Security=True;User Instance=True



  • Sunday, November 08, 2009 2:49 AMYichun_FengMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi WasekMajlis,

     

    For connecting MDF file remotely, you can refer to the following two option:

     

    1.    Place the database at a network PC, then connect it via UNC path:

    Dim con As New SqlConnection("Data Source=.;Integrated Security=True;AttachDbFilename=\\ ServerAddressOrName\Share\DBname.mdf")

     

    2.    Attach the database onto SQl Server Management Studio, then via the following connection string:

    Dim con As New SqlConnection("Data Source=ServerAddress;Initial Catalog=DBname;User Id=myUsername;Password=myPassword;")

     

     

    Here are connection strings for SQL Server 2005  http://www.connectionstrings.com/sql-server-2005

     

     

     

    Best Regards

    Yichun Feng


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
  • Monday, November 09, 2009 2:38 PMWasekMajlis Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Michaele,

      Not very much confident. Need step by step assistence.  What do you mean by  "Place the database at a network PC, then connect it via UNC path" please explain.  and what is UNC? where do I write all these connection strings. Thanks

    Wasek