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
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
Re: Developing an instalation file in VB2008
Thanks, Gary.
I did all this, but I still got this error:
http://img695.imageshack.us/img695/1...board01111.jpg
Do I need to do something else? Or I did something wrong?
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
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?
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
Re: Developing an instalation file in VB2008
OK, thanks. I'll try that.
Re: Developing an instalation file in VB2008
Hey,
How did you get on with this? Are you getting any further?
Gary