What is the best way to routinely import a CSV or XML file into a MS access database? - csv

I have an Access database that keeps track of many different aspects of my companies performance and I would like to add functionality to keep track of the hours the employees are working.
The hours are all kept track of on a website called timetracker. They have a few reporting options including XML and CSV files. The site has a favorite report feature to get the same data in the format that I want it every week.
What I would like to do is find the best process for getting the data from this website, into a table in my database that I can reference.
I will not be the one executing whatever process I come up with and I would really like it to be as easy as possible for whoever it is that does have to do it.
Right now I have a linked table that is an XML file in our SharePoint folder. I was thinking that maybe we could just run the report and download the file every week then just save it over the old file with the correct sheet names and it should update.
What I am wondering is if anyone can come up with an easier process for doing this that would take the least amount of time and be easiest to write down instructions for that anyone could execute.
(Would it maybe be possible to create some sort of macro to actually download the report automatically?)

Related

phpMyAdmin seems the easiest way to populate my new vBulletin forum with hundreds of new users and articles. How do I do it?

My new vBulletin forum is empty, and I want to encourage new users to visit, like and contribute. But first, I need to make it...not empty. As an admin, I could manually type in a bunch of threads, all from 'admin' - but that won't work. One look at either an empty website or a site filled with admin posts are equally undesirable. So I need to add hundreds of posts from hundreds of users before day one.
I assume that I should do this via the database, which I can access from phpMyAdmin via cPanel. I tried to download (export) the 'user' table with its 74 columns as a CSV table for MS Excel, but when I opened it in Excel, it was not in table form - it was all , and " in a string. If I could only see it laid out nicely in Excel, I could paste hundreds of usernames into the USER table, and and hundreds of articles into the THREAD table. I think. Am I missing something?
I am definitely going to fake it until I make it - there is simply no other way with a new website. The question is whether I have to manually do it from the front end for each user and each new thread (weeks of work), or whether I can paste them all into the database in a couple of hours.
Please help. Thanks.
Just regarding Excel, use the 'Text to Columns' tool on the Data tab to convert the CSV string into columns.
Where are you getting the content from to pre-load your forum though? If you have to make it up anyway, then is there much actual time saving in loading data in via phpMyAdmin in reality?
Assuming you have some content available from somewhere though, then you can export to CSV again from Excel and use a CSV to SQL tool (eg. https://codebeautify.org/csv-to-sql-converter though there are others around also) to generate SQL INSERT statements for uploading via phpMyAdmin or other DB tools. (I don't recall if phpMyAdmin has a SQL file upload mechanism or if you just have to paste the SQL into the browser window... have not used it for a good few years now).

Updating Linked Table while the Table is open

I have a front end MS Access Database that allows users to display records. This is based on a central .txt file that I have stored on a network drive. Each morning, I perform an ETL process that takes data from a variety of sources, combines it, and stores it in the .txt file. If someone is using the database and has one of the queries open that references this .txt file, I get an error that says the file is currently in use and I cannot make a change to it.
I've attempted writing a query that pulls the data from the .txt file and stores it in a table within the Access database so that it is not actively referencing the base file, but if multiple people attempt to run this query they get errors because you cannot replace a table that is open by someone else.
Does anyone have any experience in getting around an update issue like this? Would I be better off choosing a different front end other than Access to display queried records from a central table?

How to manage "releases" with MS Access

I have an MS Access 2016 application that a few people use in one department. I know this whole thing has web dev written all over it but this access database has been their process for a while and there is no time right now to switch over.
Recently, a different department wants to use this application, but having their own copy. Currently, if I need to make changes, I'll make the changes in a copy of the app, they send me a current version when I'm ready to import their data, I import it and send them back a new one. However, currently I copy the data table by table and past it into the new database. This is inefficient and tedious, and now with 2 sets of data I'd be doing this for, that's crazy. There's over 20 tables so I don't want to have to manually copy over 40+ tables across the 2 apps for even the smallest change like altering a message to the user.
I know I can copy the code so I can avoid importing the data, but sometimes for big changes I'll change over 15-20 vba files.
So, a couple questions:
1.Is there a way to generate insert statements for the entire database that I could run in a script? So when I create the new copy I just upload 1 file and it populates all the data?
2.Are there any kind of dev tools that will help this process? Right now I'm thinking that it's just a downfall of creating an MS Access app, but there must be some way that people have made the "new release" process easier. My current system seems flawed and I'm looking to have a more stable process.
EDIT:
Currently I have all my data stored locally, attached to the same access file as the front end. Since I will have 2 different departments using the same functionality, how do I manage the data/the front-end? These 2 departments should have their own access file to enter data using the forms, so having 1 front end between the 2 departments won't work.
Also, should I create 2 separate back-ends? Currently I would have nothing to distinguish what is being inserted/changed/deleted from one department from the other. If I were to attach a field specifying who entered the record, that would require a complete overall of all my queries which I don't have the time for as there are deadlines I need to meet.
First thing is to split the database. There is a wizard for this.
Then you can maintain the frontend without touching the real data.
Next, consider using a script to distribute revised versions of the frontend. I once wrote an article on one proven method to handle this:
Deploy and update a Microsoft Access application in a Citrix environment

How to protect Access database and limit to certain computers

Good morning,
I'm doing a project, the customer prefers to use Access 2013 as the all in one package - front end, database etc.
In short the customer will give their users a blank copy of the database, which is taken on site and used to generate data based on calibration of equipment for that site.
The problem is the customer doesn't want anyone being able to copy the access database and use it themselves. So basically when on site he doesn't want the customer or anyone to go "oh that database is hand, give me a copy and I'll use it for myself".
I know I can compile the database but that will only protect the source.
Any suggestions on the best way to limit the use of the database?
It's been a few years and I may be foggy on parts of this, but I know you can get around password protected databases, and can bypass the 'startup' form/code so that you can open the database and view all the objects. You are correct that an MDE will not show the code. But if you have a table of valid serial numbers or MAC Id's, then I would have a module that encrypts the data in that table. Otherwise someone could add their values and still run the program? We also did some devious things like create an install package that would create some hidden file in some existing folder (with a calculated value as content), then if Access didn't find that file & content it would not run.

Access - Linked Excel Sheet query

I am currently working on a database which will bring a number of excel sheets together. I have created a link between the ones in which I need and set up relationships in Access.
I have first-year degree experience of Microsoft software packages. I am not going to move from Excel to Access as other team members are more comfortable using it. However running things like reports, creating forms and querying data can be easier in Access.
The Problem:
I am trying to query data from a linked spreadsheet and it sometimes works and sometimes doesn't. Often more than none my queries return blank when I know they shouldn't.
Is this something to do with the table being linked and not an access table?
Please see an example query that I have set up
Thank you in advance.
If I assume that Status On is a Date field then your criteria is treating this as text, and this expression:
Like "*/*/2013"
may cause unexpected return results, depending particularly on the default Date format of Excel. Use the criteria:
Year([Status On])=2013
which will be much more reliable, not depending on the formatting of the date, purely on the fact that it is a recognisable date.
I don't usually have issues linking to Excel files unless:
The file is Open
The Excel files has links to other files or macros
It is corrupted in some way.
If you are linking to an Excel file then it, ideally, should be a very simple file with, preferably, no other content than a single table of data.