Solved

Add table to Access Database after deployment

Posted on 2013-06-23
4
228 Views
Last Modified: 2013-06-27
Hello,

I have the need to add a new table to an ms access database after I deployed my app without impacting my users.

Would anyone have an example of how to implement this in vb.net?

Thanks

MW
0
Comment
Question by:WINN2012
[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
  • 2
  • 2
4 Comments
 
LVL 27

Expert Comment

by:MacroShadow
ID: 39269766
0
 

Author Comment

by:WINN2012
ID: 39269922
Perfect, now how wold you go about inplementing it?
As a test I have my code associated with a button on my main form creates the table as desired, after that is complete dont i have to re-attach my datasource?
Could I use the version number, if version # 1.2.3 then run the update?
How would I disable it? Does it not run if the table exists already, would hate for it to overwrite the table.

MW
0
 
LVL 27

Accepted Solution

by:
MacroShadow earned 500 total points
ID: 39270378
Perfect, now how wold you go about inplementing it?
Well, that's what the tutorial is all about.

dont i have to re-attach my datasource?
That would make sense. See this tutorial for an idea how to link http://www.programmersheaven.com/mb/VBNET/386345/386345/program-demonstrating-ms-access-database-manipulation/?S=B20000

Could I use the version number, if version # 1.2.3 then run the update?
Yes you could. See this for information on getting the version number of your assembly. http://blogs.msdn.com/b/junfeng/archive/2004/02/28/81407.aspx

How would I disable it?
Pseudo code:
If Assembly.GetExecutingAssembly().GetName().Version = 1.2.3 Then
    'run the update
Else
    'don't run the update
End If

Does it not run if the table exists already, would hate for it to overwrite the table.
Why don't you check it out yourself.
0
 

Author Closing Comment

by:WINN2012
ID: 39281924
Worked like a champ.

Tyvm

MW
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

733 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