Solved

Add table to Access Database after deployment

Posted on 2013-06-23
4
224 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
  • 2
  • 2
4 Comments
 
LVL 26

Expert Comment

by:MacroShadow
Comment Utility
0
 

Author Comment

by:WINN2012
Comment Utility
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 26

Accepted Solution

by:
MacroShadow earned 500 total points
Comment Utility
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
Comment Utility
Worked like a champ.

Tyvm

MW
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

772 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now