Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access to Access data transfer

Status
Not open for further replies.

me1258

Programmer
Dec 28, 2003
8
US
Hi I am creating a program in VB.NET with an access 2003 database. This program will be in 2 physical locations. This is a program that sells tickets. At the end of the day I need to be able to get that days sales data off the remote location and update the main location with that information. This will be sales totals only. The user will plug in a thumb drive to move the data from one machine to the other. Due to the physical layout and other considerations this is the best option. The only action I want the user to have to do is to place the thumb drive in the USB port and hit the “down load” button. Then on the main location the user should be able to just plug in the thumb drive and hit up load. The database needs to be updated with the data from the remote location. What is the best way to do this?
Thanks in advance.
 
You can of course hard-code the paths to the USB ports where the data is to be written or read but I tend to be highly allergic to hard coding. Allow the user to select the path where Upload or Download are to operate and stash that in an INI file, the registry, an Access table, etc. ... whatever makes the most sense for you.

From there on you can just load the path from where ever you saved it and do a simple TransferText with the appropriate arguments to upload or download the data.

You will need to build in some error trapping because users are prone to doing things like clicking "Upload" or "Download" before putting the memory stick into the USB port which will raise a "Drive Not Ready" or "Drive Does Not Exist" error.

Also note that TransferText replaces an existing file when you are exporting data so the system that is supposed to be receiving the data should not be enabled to export such data or you can inadvertently wipe out the data that you wanted to import.
 
Hay
Thanks for the answer. I have a cofession to make though I have no clue half of what you just said. I am new to this and I dont understand how to do half of what you suggest. First things first... in what way do I get the data from one database to another? Am I doing a replication, or an update? I am unsure even if I am using the proper terms here. Sorry to be ignorant of how this works but if someone could point me in the right direction that would be appreciated.
 
A good place to start is a search for TransferText in these fora and Microsoft Help. You will need to do a good deal of reading, if you are standing that far back. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top