locked
I am building a desktop application with database.i taken the local path while i am devalopping.but when i installing on other system it showing database error so how can i put my db path for desktop application to use it any where? RRS feed

  • Question

  • plz help me....

    krish

    • Moved by Forrest Guo Tuesday, February 5, 2013 5:01 AM data connection question
    Monday, January 28, 2013 6:42 AM

All replies

  • Are you using SQL Server, or some other DBMS?

    Will there be multiple instances of your application, all accessing a single database instance?

    If so, you will have to configure your app to use a network path to the single instance.

    Or, does each application instance use it's own copy of the database?

    If so, this article:

    http://msdn.microsoft.com/en-us/library/ms254504(v=vs.100).aspx

    shows how to create a relative path. Read the Connecting to a User Instance section.

    Once we have the information requested above, useful suggestions can be provided.


    • Edited by pvdg42 Monday, January 28, 2013 3:57 PM
    Monday, January 28, 2013 3:49 PM
  • i am using sqlexpress(inbuilt database).each application instance use it's own copy of the database

    krish

    Monday, January 28, 2013 3:55 PM
  • Then, you should use the relative path technique as shown in the article I cited.

    "If so, this article:

    http://msdn.microsoft.com/en-us/library/ms254504(v=vs.100).aspx

    shows how to create a relative path. Read the Connecting to a User Instance section."

    From the article:

    Data Source=.\\SQLExpress;Integrated Security=true;
    User Instance=true;AttachDBFilename=|DataDirectory|\InstanceDB.mdf;
    Initial Catalog=InstanceDB;

    Monday, January 28, 2013 4:33 PM
  • thanq i will try with this...

    krish

    Monday, January 28, 2013 4:35 PM