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. Publishing Database apps.

Publishing Database apps.

Scheduled Pinned Locked Moved Visual Basic
databasecomtoolsquestionworkspace
12 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.
  • T Tirthadip

    you need not to include the database file in the set-up project,but you have to install the database in the machine where the application is running.......moreover if its a client-server application then install the database in the server...... and finally check for the connection string whether it is pointing to the right database in the right machine or not......

    Tirtha Do not go where the path may lead, go instead where there is no path and leave a trail. Author: Ralph Waldo Emerson (1803-82), American writer, philosopher, poet, essayist

    T Offline
    T Offline
    The ANZAC
    wrote on last edited by
    #3

    ok. how do i install the database and what not and set the connection string correctly?

    Please check out my articles: The ANZAC's articles

    D 1 Reply Last reply
    0
    • T The ANZAC

      ok. how do i install the database and what not and set the connection string correctly?

      Please check out my articles: The ANZAC's articles

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #4

      First, you have to say which database you're using. Sql Server, MySQL, Access?? Then you have to tell us what deployment method you're using. Is it ClickOnce, or a Setup and Deployment project, creating an .MSI installation, or something else??

      A guide to posting questions on CodeProject[^]
      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
           2006, 2007

      T 1 Reply Last reply
      0
      • D Dave Kreskowiak

        First, you have to say which database you're using. Sql Server, MySQL, Access?? Then you have to tell us what deployment method you're using. Is it ClickOnce, or a Setup and Deployment project, creating an .MSI installation, or something else??

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007

        T Offline
        T Offline
        The ANZAC
        wrote on last edited by
        #5

        Ok i'm doing a setup deployment project using an SQL database.

        Please check out my articles: The ANZAC's articles

        D 1 Reply Last reply
        0
        • T The ANZAC

          Ok i'm doing a setup deployment project using an SQL database.

          Please check out my articles: The ANZAC's articles

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #6

          There's nothing to deploy. You can either build the connection string at deployment time using custom actions, or, a more flexible option, is you have this is a setting in your application and you create a new connection string using a template, filling in the server name.

          A guide to posting questions on CodeProject[^]
          Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
               2006, 2007

          T 1 Reply Last reply
          0
          • D Dave Kreskowiak

            There's nothing to deploy. You can either build the connection string at deployment time using custom actions, or, a more flexible option, is you have this is a setting in your application and you create a new connection string using a template, filling in the server name.

            A guide to posting questions on CodeProject[^]
            Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                 2006, 2007

            T Offline
            T Offline
            The ANZAC
            wrote on last edited by
            #7

            ok...you make it sound simple, but maybe i should clarify. I am really just getting the hang of database stuff so i don't know exactly how to do what you are telling me. As far as i know the connection string is in a setting, i just don't know how to set it properly to the computer it gets installed on, i figure i do it on form load, but how exactly would i go about it. Here is the default connection string in settings: Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\PasswordManager.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True Do you think you could be so kind as to explain it all to me please. Please if you could explain what i have to change and how.

            Please check out my articles: The ANZAC's articles

            D 1 Reply Last reply
            0
            • T The ANZAC

              ok...you make it sound simple, but maybe i should clarify. I am really just getting the hang of database stuff so i don't know exactly how to do what you are telling me. As far as i know the connection string is in a setting, i just don't know how to set it properly to the computer it gets installed on, i figure i do it on form load, but how exactly would i go about it. Here is the default connection string in settings: Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\PasswordManager.mdf;Integrated Security=True;Connect Timeout=30;User Instance=True Do you think you could be so kind as to explain it all to me please. Please if you could explain what i have to change and how.

              Please check out my articles: The ANZAC's articles

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #8

              If you're installing SQLExpress, then all you need to do is put the .MDF file in the same folder as your executable, under the Program Files folder. The |DataDirectory| path of the connection string is automatically replaced with the path your .EXE was launched from. You don't have to do anything else to your installation. Nor do you have to do anything in your application or the connection string. So, if your .EXE is launched from "C:\Program Files\MyCompany\MyApplication\app.exe", the |DataDirectory| replacement will get "C:\Program Files\MyCompany\MyApplication". This results in a connection string that looks like:

              Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Program Files\MyCompany\MyApplication\PasswordManager.mdf;
              Integrated Security=True;Connect Timeout=30;User Instance=True

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007

              T 1 Reply Last reply
              0
              • D Dave Kreskowiak

                If you're installing SQLExpress, then all you need to do is put the .MDF file in the same folder as your executable, under the Program Files folder. The |DataDirectory| path of the connection string is automatically replaced with the path your .EXE was launched from. You don't have to do anything else to your installation. Nor do you have to do anything in your application or the connection string. So, if your .EXE is launched from "C:\Program Files\MyCompany\MyApplication\app.exe", the |DataDirectory| replacement will get "C:\Program Files\MyCompany\MyApplication". This results in a connection string that looks like:

                Data Source=.\SQLEXPRESS;AttachDbFilename=C:\Program Files\MyCompany\MyApplication\PasswordManager.mdf;
                Integrated Security=True;Connect Timeout=30;User Instance=True

                A guide to posting questions on CodeProject[^]
                Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                     2006, 2007

                T Offline
                T Offline
                The ANZAC
                wrote on last edited by
                #9

                i'm beginning to sound dumber and dumber here, but how do i put the database in the folder, through the deployment project or programmatically?

                Please check out my articles: The ANZAC's articles

                D 1 Reply Last reply
                0
                • T The ANZAC

                  i'm beginning to sound dumber and dumber here, but how do i put the database in the folder, through the deployment project or programmatically?

                  Please check out my articles: The ANZAC's articles

                  D Offline
                  D Offline
                  Dave Kreskowiak
                  wrote on last edited by
                  #10

                  The deployment project. Right-click the Application Folder in the File System, pick Add, then Project Output. In the dialog that shows up, click on Content, then OK. Rebuild the solution.

                  A guide to posting questions on CodeProject[^]
                  Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                       2006, 2007

                  T 1 Reply Last reply
                  0
                  • D Dave Kreskowiak

                    The deployment project. Right-click the Application Folder in the File System, pick Add, then Project Output. In the dialog that shows up, click on Content, then OK. Rebuild the solution.

                    A guide to posting questions on CodeProject[^]
                    Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                         2006, 2007

                    T Offline
                    T Offline
                    The ANZAC
                    wrote on last edited by
                    #11

                    Its all working now, thanks a heap for your help, i've learnt some valuable information. Thanks again. P.S. I must say, as cynical as you sometimes seem, you are one of the most effective helpers on here and well and truly deserving of the MVP.

                    Please check out my articles: The ANZAC's articles

                    D 1 Reply Last reply
                    0
                    • T The ANZAC

                      Its all working now, thanks a heap for your help, i've learnt some valuable information. Thanks again. P.S. I must say, as cynical as you sometimes seem, you are one of the most effective helpers on here and well and truly deserving of the MVP.

                      Please check out my articles: The ANZAC's articles

                      D Offline
                      D Offline
                      Dave Kreskowiak
                      wrote on last edited by
                      #12

                      I tend to add a bunch of sarcasm to what I say, though I do get short with people who don't bother to help themselves. I'm definitely not saying that you're one of them.

                      A guide to posting questions on CodeProject[^]
                      Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                           2006, 2007

                      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