publish a project

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • wassssup
    New Member
    • Oct 2007
    • 47

    publish a project

    hi i want to ask how to successfully install a published program into another computer
    in my project i: build -> Publish then follow all the steps, then save it to cd then install in other computer, but when i run, i have a problem with the database. as far as i know, i use Application.Sta rtupPath in the connection string which would solve the problem, but it dindn't
    please help
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    Originally posted by wassssup
    hi i want to ask how to successfully install a published program into another computer
    in my project i: build -> Publish then follow all the steps, then save it to cd then install in other computer, but when i run, i have a problem with the database. as far as i know, i use Application.Sta rtupPath in the connection string which would solve the problem, but it dindn't
    please help
    Hi there,

    What do you mean by you have a problem with the database? How are you connecting to the database? What error are you receiving? Are you using ODBC for instance?

    Please provide some more information.

    Regards,

    Dr B

    Comment

    • wassssup
      New Member
      • Oct 2007
      • 47

      #3
      Originally posted by DrBunchman
      Hi there,

      What do you mean by you have a problem with the database? How are you connecting to the database? What error are you receiving? Are you using ODBC for instance?
      Please provide some more information.
      Regards,
      Dr B
      i cant connect to the database, giving a whole list of errors
      i connect to the database through the program, its a login page, so when i click login, it supposed to check with the databse, thats where the error occurs

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        This is a web application then?
        You would need to configure the IIS on the computer where you trying to install/run it from to have permisions with the database.

        Comment

        • wassssup
          New Member
          • Oct 2007
          • 47

          #5
          Originally posted by Plater
          This is a web application then?
          You would need to configure the IIS on the computer where you trying to install/run it from to have permisions with the database.
          oops...forgot to specify that...its a windows form application, not web app..

          Comment

          • DrBunchman
            Recognized Expert Contributor
            • Jan 2008
            • 979

            #6
            OK, so what are the errors that it's throwing?

            Comment

            • wassssup
              New Member
              • Oct 2007
              • 47

              #7
              Originally posted by DrBunchman
              OK, so what are the errors that it's throwing?
              it says:
              unhandled exception has ocurred in your application. if you click Continue, the application will ignore this error and attempt to comtinue. if you click quit , the application will close immediately.

              could not find file 'C:\Documents and setting\ local settings\ Apps\2.0\AVGR.P 70\Stock.mdb

              Comment

              • DrBunchman
                Recognized Expert Contributor
                • Jan 2008
                • 979

                #8
                You need to configure the location of your database file (Stock.mdb) correctly. If you know where it lives then configure your code to point to it.

                Dr B

                Comment

                • wassssup
                  New Member
                  • Oct 2007
                  • 47

                  #9
                  Originally posted by DrBunchman
                  You need to configure the location of your database file (Stock.mdb) correctly. If you know where it lives then configure your code to point to it.
                  Dr B
                  i tested it with the computer that i used to develop the app. if i compile and run the app, no problem. if i publish and run from there same problem...even though the database is still at the right place

                  Comment

                  • Plater
                    Recognized Expert Expert
                    • Apr 2007
                    • 7872

                    #10
                    It's def looking for your database in the temporary runtime directory.
                    That would be a problem of using Application.Sta rtupPath, since the startup path will be the temporary directory.

                    Comment

                    • wassssup
                      New Member
                      • Oct 2007
                      • 47

                      #11
                      Originally posted by Plater
                      It's def looking for your database in the temporary runtime directory.
                      That would be a problem of using Application.Sta rtupPath, since the startup path will be the temporary directory.
                      so what do you recomend me to use?
                      is there another way to solve this problem?
                      please help

                      Comment

                      • Plater
                        Recognized Expert Expert
                        • Apr 2007
                        • 7872

                        #12
                        Have you tried not specifying a path and keeping the .mdb file in the same directory as the .exe?

                        Comment

                        • wassssup
                          New Member
                          • Oct 2007
                          • 47

                          #13
                          Originally posted by Plater
                          Have you tried not specifying a path and keeping the .mdb file in the same directory as the .exe?
                          yeah...my code looks like this..
                          Application.Sta rtupPath + \\fypStock.mdb

                          Comment

                          • Plater
                            Recognized Expert Expert
                            • Apr 2007
                            • 7872

                            #14
                            Originally posted by wassssup
                            yeah...my code looks like this..
                            Application.Sta rtupPath + \\fypStock.mdb
                            Try doing JUST
                            "fypStock.m db"

                            Comment

                            Working...