Making database portable in VB.net

Posted on 2005-02-24
Medium Priority
Last Modified: 2013-11-22
I am a VB.net programmer.  I am using oledb's (Access)  How do I make these portable?  I have tried putting in bin folder and it still doesn't work.

Question by:hunterdnance
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 15

Assisted Solution

by:Ralf Klatt
Ralf Klatt earned 600 total points
ID: 13400874

Connection to your database can be done using DSN-less connection strings ... for MS Access it would be:

With ODBC:
"Driver={Microsoft Access Driver (*.mdb)}; Dbq=c:\yourDB.mdb;"

"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\yourDB.mdb;"

If you change the path it could also leed to the "bin" directory of your application:


Best regards,
LVL 22

Accepted Solution

JesterToo earned 1400 total points
ID: 13400913
What do you mean by "portable"?  Do you mean make it part of the deployable installation package?

I can think of two ways that should work... there are probably more.  

1.  Since XCOPY is one of the simpler methods of deployment you could easily incorporate the commands to copy all the files
     you project requires.  You could wrap this up in any of the windows scripting languages or even a bat file.

2.  Depending on what type of project you're deploying there are various "Setup Wizard" tools and editors available.  One of those editors is for "Custom actions"... here you can define any program you need to run during the installation of your app.

I;m going by memory for this since I haven't worked much with .net the past couple of years.  I'm hoping to get back into it again "as soon as I can find the time" ;-)


Expert Comment

ID: 13490916
What do you mean by "portable"?  Do you mean make it part of the deployable installation package?

Can you actually do that?

So then you can hide or encrypt the database on the client machine.

Thanks for suggestions

Featured Post

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Six Sigma Control Plans

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question