Skip to content

Installation set up

shiju kv

Asked Jan 13, 2015, 2:45 AM EST7 answers
Share
LinkedInX
hi ,
i want to make the installation file of my windws  application.my database is located in c:\user\documents\templedbs.mdf.
how to add this database with the installation set up 

7 Answers

Know the answer? Post it. Somebody with the same question will find it here.

  • +1
    You wish to use a code to get the path to the users documents folder?


    Code:
    Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
    +1
  • +1
    No you have to copy the database file to the installed software (i.e. where your s/w .exe file is kept) place and it will automatically catch your database file and then call Application.Startup
    +1
  • 0
    Application folder
    user desktop folder
    user programs menu
        
                to which folder i have to copy my database file. or i need to create any special folder
    ....
    pls answer for this sir
    0
  • 0
    You can add that database file at the installation place and from there you can call Application.StartUp
    0
  • 0
    DONT GET YOU SIR , could you please explain me . where to copy the database file to among three. or have to create any special folder when using Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
    0
  • 0
    It would depend on how you will 'copy' the Database to the users computer.


    -Download it from a site
    -Add it with the program (internal(inside your .exe) or external(as a file))
    -Being accessed via a server without any download


    Download:
    To download a file in a very simple way you can use WebClient

    Add it:
    Either add it to the resources and write it from the program
    -Internal
    -External (just drag the file with the program. Use: Application.StartupPath + "\\*file name*) to navigate to the files location (this means that the file is in the same directory/folder as the program!)

    Access from server:
    To access it via an server you need to use SQL stuff. Read Here
    0
  • 0
    its working for me . but i am using report viewer in this project . it says that an error "an attempt to access auto named database c:\user\blp\documents\templedbs.mdf" or its located in unc share . whats this
    0