Results 1 to 8 of 8

Thread: Developing an instalation file in VB2008

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2009
    Location
    Croatia
    Posts
    9

    Developing an instalation file in VB2008

    I need to integrate Database into my project. I found some help:
    Code:
    properties of the project:
    references, add, existing item, choose DB mdf & ldf
    properties of the form:
    build action-content
    copy to output directory-copy always
    
    data source=.......attachDbFileame=DataDirectory\.....
    But when I click on Add, it doesn't give an option for existing item.

    Please, help.

    p.s. I use VB2008 Express and MS SQL Server 2005

  2. #2
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Developing an instalation file in VB2008

    Hey,

    Are you actually right clicking on your project and then references?

    If so, this isn't quite right, simply right click on your project, then choose Add | Existing Item...

    Then follow the rest of your steps.

    Gary

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2009
    Location
    Croatia
    Posts
    9

    Re: Developing an instalation file in VB2008

    Thanks, Gary.

    I did all this, but I still got this error:


    Do I need to do something else? Or I did something wrong?

  4. #4
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Developing an instalation file in VB2008

    Hey,

    Have you confirmed that the database exists at that location?

    Or, does another database with the same name already exist in the SQL Server instance?

    Gary

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2009
    Location
    Croatia
    Posts
    9

    Re: Developing an instalation file in VB2008

    I moved a database. That is the point. I want to install this program on another computer with integrated database. Can I do that?

  6. #6
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Developing an instalation file in VB2008

    Hey,

    In order to use an mdf file though, you need to have an instance of SQL Server to connect it to. Do the other computer that you are running the application on have SQL Server installed? If so, it is likely that you will need to change the connection string to include the new server name.

    If you are looking for your application to be truly portable, you might want to think about storing your data in a SQL Server Compact Database. This doesn't require an instance of SQL Server in order to operate.

    Gary

  7. #7

    Thread Starter
    New Member
    Join Date
    Mar 2009
    Location
    Croatia
    Posts
    9

    Re: Developing an instalation file in VB2008

    OK, thanks. I'll try that.

  8. #8
    PowerPoster gep13's Avatar
    Join Date
    Nov 2004
    Location
    The Granite City
    Posts
    21,963

    Re: Developing an instalation file in VB2008

    Hey,

    How did you get on with this? Are you getting any further?

    Gary

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