Results 1 to 6 of 6

Thread: vb.net deployment

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    vb.net deployment

    Hi guys, i am in need to solve this problem which i am having during deployment. I have create a simple windows/console application with ms access at the back hand. I put my db file in bin folder of my project and created a conneciton from there on. Everything is working fine, but iam not sure how to and where to put my databasefile for the deployment, becuase my datagrid doesn't populated on another computer, says something about the exporting of the ms database file. Below are the steps how i deployed
    File->Add Project->New Project->Setup Wizard->Create a setup for windows application-> selected "Primary out put..." checkbox-->Add "Readme.txt" ->
    Finish.

  2. #2
    PowerPoster sparrow1's Avatar
    Join Date
    May 2005
    Location
    Globetrotter
    Posts
    2,820

    Re: vb.net deployment

    Quote Originally Posted by Intelguy
    Hi guys, i am in need to solve this problem which i am having during deployment. I have create a simple windows/console application with ms access at the back hand. I put my db file in bin folder of my project and created a conneciton from there on. Everything is working fine, but iam not sure how to and where to put my databasefile for the deployment, becuase my datagrid doesn't populated on another computer, says something about the exporting of the ms database file. Below are the steps how i deployed
    File->Add Project->New Project->Setup Wizard->Create a setup for windows application-> selected "Primary out put..." checkbox-->Add "Readme.txt" ->
    Finish.
    Hi,

    Click on the Application Folder -> Action -> Add -> File give it the File Name.
    Then your File will be installed on other PC's aswell.

    Hope it helps,

    sparrow1
    Wkr,
    sparrow1

    If I helped you, don't forget to Rate my post. Thank you

    I'm using Visual Studio.Net 2003 and
    2005
    How to learn VB.Net Create setup with VB 2005 Drawing for beginners VB.Net Tutorials GDI+ Tutorials
    Video's for beginners

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2006
    Posts
    20

    vb.net deployment

    Can some body plz help me out i am completely stuck on this simple vb.net deployment. I have been to websites but haven't found the one which tells step by step graphically how to deploy ms access database file with vb.net project. Basially, I want to see the deployed working application on windows startup-->Programs menu with ms-access at the back hand.

  4. #4
    PowerPoster
    Join Date
    Aug 2005
    Location
    College Station, TX
    Posts
    4,521

    Re: vb.net deployment

    Have you created a new Setup Project inside of your program solution? (Right click solution in solution explorer, click "Add", then "new project", then choose Setup project under "Setup And Deployment Projects". Once added, Right click the setup project in solution explorer, and click "add" then "Poject Output", then select "Primary Output". To add the datatabse, right click the setup project again in solution explorer, and click "Add", then "File" and select your database....

  5. #5
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: vb.net deployment

    I just searched the help for "setup wizard" (without quotes) and the first result contains the following information:
    Allows you to add a deployment project to your solution and configure it to deploy your application. Projects created using this wizard will place the deployment files on your local computer for later distribution.

    Note The Setup Wizard is not available in the Standard Edition of Visual Basic .NET. For more information, see Visual Basic Standard Edition Features.
    To access the Setup Wizard, on the File menu, point to Add Project, then click New Project. In the Add New Project dialog box, click the Setup and Deployment Projects node, and then click Setup Wizard.

    Choose a project type
    Specifies the type of deployment project that will be created. You can create a setup (Windows Installer) project for a Windows or Web application, create a merge module to be shared by other applications, or package files in a Cab file.
    Choose project outputs to include
    Specifies project outputs to be added to the deployment project. You can select one or more outputs from the list of all outputs available in the solution. When an output is selected, the Description field displays a description of that output.
    Choose files to include
    Specifies additional files to be included for deployment. Use the Add button to browse for additional files, or use the Remove button to remove files from the list.

    Summary
    Provides a summary of the options selected for the deployment project.
    It would appear that the third step, which I've boldened, is what you need to take note of. This is for VS.NET 2003 but I'd assume that VS 2005 is similar.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  6. #6
    Frenzied Member maged's Avatar
    Join Date
    Nov 2002
    Location
    Egypt
    Posts
    1,040

    Re: vb.net deployment

    may be you are opening the connection of the access file in absolute file path, for example your access file is located on your computer on c:\test\main.mdb.

    when users try to deploy it on other computers, the path of installation is changed and the program wont find the datatabase in it's hardcoded path (c:\test\main.mdb).

    i would recommend using a dynamic path for opening the database connection

    like this

    VB Code:
    1. dim dbfilename as string
    2. dbfilename = applicatiion.startuppath & "\main.mdb"

    this way whenever and whatever the path is , it will be compiled at runtime assuming that you have successfuly copied the database file into the target directory of deployement.

    note: i am assuming that your database file is called: main.mdb, but you can change it to whatever filename you use .

    bst rgds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width