?
Solved

Making database portable in VB.net

Posted on 2005-02-24
3
Medium Priority
?
886 Views
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.

Thanks
0
Comment
Question by:hunterdnance
[X]
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
3 Comments
 
LVL 15

Assisted Solution

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

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;"

With OLEDB:
"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:

System.Windows.Forms.Application.StartupPath


Best regards,
Raisor
0
 
LVL 22

Accepted Solution

by:
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" ;-)

HTH,
Lynn
0
 

Expert Comment

by:LorneBackler
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
0

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