MS-Access - Easiest way to automatically extract a table - ms-access

Here's the background for my question:
My program will be getting a new copy of an MS-Access database every night, and I need way to automatically pull data from one table of out it. (Preferably using Python).
I don't know much about Access but so far I'm thinking I could save the file on a windows computer, (launch it?) and access the data via ODBC. Would that work, is there an easier way? How would I automatically launch it and start ODBC running?
I'm open to other suggestions, for example is there a way to parse the Access file directly? Or run an export script from within Access?

You can read data in Access using ODBC without opening it. You just need to know the file location, and the connection string. Then read data from your table using SQL commands.

Related

Need a way to find a string across entire access database

I installed an access add-incalled "Search Wizard" by Dev Ashish and Terry Kreft. But it doesn't work right. It is supposed to search across the entire access database, including forms, code, queries, reports, etc. for a given string. However it either hangs or crashes/exits before completing. I am looking for something that performs this function but actually works, whether it is a piece of code or another existing utility
This is against Access 2016. We have an Access application that has a sql server back end. the SQL server is an express edition that is running out of space.So we need to change all database connection references to a new sql server / new database. We found one place in the code where it "relinks" all linked tables based on a local access table that specifies what database to connect to. It would be great if that was the only place that the server and database were referenced. However, I did a search using a binary file / text editor that searches the raw data in the mdb - and that finds 173 references to the database - but the data is essentially unusable in the format provided by the binary editor. I suppose I could use the search and replace capability of the binary file editor and that would probably work, but I would be "flying blind" and not really know what I was changing.

How to change a MS Acess database into a MySql database or atleast move the data across quickly?

I created a program that stores the scores of a competition into a MS Access database but now I need to change in to use MySql. How can I transfer all the tables and data across?
The easiest way to do this in bulk is to right click on the tables in MS Access and select Export > Text File. This will allow you to save each table as a csv file.
Once you've done that, you can use whatever management program you're using to import the csv files. If you're using MySQL's workbench, this tutorial should help you. If you want to do it manually, this one should help.

What is best approach for using inno-setup to load a MySQL database

Am a bit new to inno-setup and using it to create my java executable file and using MySQL as a database file. i just have two question:
First, If a user already has MySQL and i want to detect and load a database. do i use MySQL open database connectivity(odbc)
Second, which approach would be the best for loading/running the script. using a batch file or simply run the script within inno-setup?
i would really appreciate some code snippets
thanks

link access 2007 into mysql

I have an Access file on a server which my colleagues will update regularly and sometimes I need to analyze the data by the following method:
download the Access file to my local drive
export the table to MySQL
open the MySQL table through R to do the analysis
This workflow is OK if I only have to do it once, but it's getting more often that I find data is missing inside the dataset, I asked the colleagues to fix it, and then I need to go over step 1-3 again, and I feel it is kinda dumb to do the 1-3 steps over and over again.
Since the Access file on server is password protected and I don't want the mess with that file, I wonder if I can created another Access file, that acts as a link between my local MySQL server and that Access file. When I launch R, data will be extracted from the MySQL server, go to my "link" Access file, and go to the Access file on server, and everytime the data I get from R is the latest version.
I wonder if I have explained it clear enough, and I have no clue how to work this out, can anyone here inspire me? Thanks!
Try:
> install.packages("RODBC")
> vignette("RODBC")

Maintaining modules/macros in Access

Hey guys I've written a little module/macro that helps our inventory department, they will need to run the module/macro a few times every month. They receive the databases from out in the field these are exported from some 3rd party inventory tracking system we have.
My question, is there any way to install this module/macro outside of the db file but still within access so that the inventory management team does not have to open vb editor, import the module, create a new macro, name it, set it up properly to execute the function?
The module/macro does not need to be changed for any new database that comes in.
Basically they need to be able to open any database received by the field and have this functionality in the module/macro available to them without having to set this. Is this possible?
You could look at my article for vb123.com:
Using Database Library Files in Your Access Application
The thinking there is that you can put access objects in a library file (still an mdb or mde file, or any of the new access file types) and then by just adding a reference to the file in your VBE project, you get that functionality made available to you.
It works with forms, reports, queries, classes, etc. To be honest, I haven't tried it with macros, but don't see a reason why it wouldn't work.
The beauty is that reusable functionality is packaged into one file, that is still just a plain old access file.
If you had the inclination, you could also write an access add in that basically calls your macro in the library.
We did this with a product for making dealing with SQL much easier in Access, and it has worked for years with Access installations all over the world. You can install the add in using a professional installation package such as wise installation, making it a pretty seamless experience for the end user of your macro. However, there is a considerable overhead in writing this kind of setup in a professional way. Depends on what your users need, I suppose.
Perhaps you are thinking of VBScript or a back-end, front-end set up?
You can use VBScript to perform actions on an Access database, through the Access object, with ADO and so on. The script can either accept command line input, request information, or run against any database in the current directory.
With back-end front-end, the new database becomes the back-end and the Access file with your macro is the front-end. Your macro should ask the user for the name of the back-end file and either use that with the Access object or link the tables, according to what is needed to be done.