Database Administrators
Q&A for database professionals who wish to improve their database skills
Latest Questions
0
votes
1
answers
104
views
How can I import multiple .xlsx and .xls files into multiple tables in Access?
I have 100 .xslx and .xls files with different formats and I need to import them all separately into Access keeping their original file names intact. Folder example: C:\Users\username\Desktop\2019_data\foldername\ sample names of the many different sheets in the folder= LGPO221154-1-ANDERSON-CELL 18...
I have 100 .xslx and .xls files with different formats and I need to import them all separately into Access keeping their original file names intact.
Folder example:
C:\Users\username\Desktop\2019_data\foldername\
sample names of the many different sheets in the folder=
LGPO221154-1-ANDERSON-CELL 18-49.xlsx
LGPO221154-1-ANDERSON-CELL 50_UP.xlsx
LGPO222975_1_CELL_49_UNDER_Bandera.XLS
LGPO222975_1_LL_49_UNDER_Comal.XLS
Juan Zendejas
(1 rep)
Feb 17, 2020, 11:58 PM
• Last activity: Feb 18, 2020, 12:09 PM
0
votes
1
answers
150
views
See direct (instead of indirect) info about rented book in my "actors_directors" talbe dropdown list - Access365
I'm building a database of "actors_directors" who are renting "books" from my library - a kind of exercise to learn database basics :-) This is how my "actors_directors" table looks like. They are the customers who are renting the books from my library. Index field is a primary key in this table. [!...
I'm building a database of "actors_directors" who are renting "books" from my library - a kind of exercise to learn database basics :-)
This is how my "actors_directors" table looks like. They are the customers who are renting the books from my library. Index field is a primary key in this table.
There are books listed in different table called "books" and similarly "Index" field is a primary key in this table.
Finally I have all the instances of the book being rented in my third table "checkouts". Please ignore the last three columns there. Similarly "Index" field is a primary key in this table.
"ForeignKeyCustomer" column refers to Index column in "actors_directors" table and its one-to-many relationship.
"ForeignKeyBook" column refers to Index column in "books" table and its one-to-many relationship.
These are relationship I've set for my tables.
Now after I unfold the pluses in the "actors_directors" table like it's shown in the next picture, there are not exactly the info I wanted to see.
What I see is the number of the book, some specific actor rented, while I'd like to see the title of this book.
Instead of info about "ForeignKeyBook" - the book's number, I'd like to see it's Title in this place. But the info about the title is in different table. Can U help me with that?
I don't want to see the book's number, because it tells me nothing.
I want to see the book's title, that is in different table, but also the "CheckOutDate" and "RentPeriod" and "RentFee" from this "checkouts" table, that's related/linked in my current situation (this screenshot).
Thanks in advance my friends.






michal roesler
(125 rep)
Nov 12, 2019, 10:59 PM
• Last activity: Nov 13, 2019, 01:40 PM
0
votes
0
answers
888
views
SSMA cannot read meta data (missing runtime components)
What I want to do should be rather easy: Use SSMA to transfer internal Access tables and queries to SQL-Server. On my Notebook I'm running SQL-Server 2017 and Office 365 (32 bit) As I have 32 bit Office (company's choice ...), I installed the *"SSMAforAccess_8.4.0_x86.msi"* from the official downloa...
What I want to do should be rather easy: Use SSMA to transfer internal Access tables and queries to SQL-Server.
On my Notebook I'm running SQL-Server 2017 and Office 365 (32 bit)
As I have 32 bit Office (company's choice ...), I installed the *"SSMAforAccess_8.4.0_x86.msi"* from the official download site and get a warning during setup, that there are components missing with a download link where I can find *"accessruntime_4288-1001_x86_en-us.exe"* (same with x64).
I tried first the x86, but it fails, because there is a 64bit "Office 16 Click-to-Run Extensibility Component 64-bit Registration" on my system. And trying to install the x64 fails too, because there is a 32bit "Office 16 Click-to-Run Extensibility Component" on my system.
I can run SSMA without any problems, load the *.accdb*, connect to SQL-Server, but it fails to read the accdb's meta data:
> Access Object Collector error: Database
> Die COM-Klassenfactory für die Komponente mit CLSID {CD7791B9-43FD-42C5-AE42-8DD2811F0419} konnte aufgrund des folgenden
> Fehlers nicht abgerufen werden: 80040154 Klasse nicht registriert
> (Ausnahme von HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)). Please make
> sure that you are using the correct version of SQL Server Migration
> Assistant. If you have 32-bit Microsoft Access installed, then you
> will need to use 32-bit version of the Migration Assistant. In order
> to use 64-bit version of Migration Assistant, you will need to install
> 64-bit Microsoft Access components available at
> https://go.microsoft.com/fwlink/?linkid=834402 .
> An error occurred while loading database information.
The german part translates to: *The COM-class could not be executed due to the given error (class not registered)*.
A search for the given CLSID brings me back to the access runtime components.
Question:
- How can I use SSMA, if I cannot install the needed runtime?
- Or: How can I install missing components, if the installation routine does not work (e.g. shift the DLL to GAC with gacutil manually)
##EDIT:
In the meanwhile I tried to use SSMA x64 to no avail...
##UPDATE
In the meanwhile I found [this (german) instruction](https://www.ugg.li/setup-fehler-office-16-click-to-run-extensibility-component-64-bit-registration/) how to find and remove the "Click-to-Run" services.
In short: Go to
%windir%\installer
, make sure that explorer is showing you the column "Betreff" (I don't know, how this is called in English, might be "regarding"). You can find the MSI-packages. Copy them somewhere and perform a right-click. Now you can choose "uninstall".
After removing these "click-to-run" stuff from my notebook I can proceed but run into the next error:
> [...] because you have these Click-to-run installer based Office
> programs installed on your computer 1) Microsoft Office 365 ProPlus -
> en-us and 2) Microsoft Office 365 ProPlus - de-de". Windows Installer
> and Click-to-Run editions of Office programs don't get along for this
> version, so you can only have one type installed at a time. [...]
So my new question is:
Can we use SSMA together with MS-Access 365 and - if not - is there an alternative?
Well, I might set up a pc just for this *one-time-issue*...
Thank you for any hint...
Gottfried Lesigang
(553 rep)
Sep 11, 2019, 09:55 AM
• Last activity: Sep 11, 2019, 12:20 PM
0
votes
1
answers
1788
views
How does one create a data base for a survey/questionnaire?
I need to create a database for a wordy questionnaire. At the end I want to be able to graph my information. Where can I do this?
I need to create a database for a wordy questionnaire. At the end I want to be able to graph my information. Where can I do this?
user75873
(1 rep)
Sep 13, 2015, 09:14 AM
• Last activity: Aug 21, 2019, 02:08 AM
1
votes
2
answers
475
views
Enforce 1 or many relationship
In the er diagram below (not mine), [![enter image description here][1]][1] [1]: https://i.sstatic.net/V4006.gif A Class can have many instructors via a standard junction table. Is there a way of designing the Instructors/Classes tables using constraints to ensure that a Class must have at least one...
In the er diagram below (not mine),
A Class can have many instructors via a standard junction table. Is there a way of designing the Instructors/Classes tables using constraints to ensure that a Class must have at least one Instructor? I.e. 1 or many instead of 0 or many? So given Classes.class_id=1, there must be an Instructors_Classes(class_id=1, instructor_id=?) Or is this something that you'd just use triggers to enforce? As a secondary, can anyone suggest a good way of identifying one, and only one Instructor as the primary instructor for a class? Currently I've added a field Instructors_Classes.IsPrimary (number) and applied a unique constraint on (class_id, IsPrimary) and a validation constraint of IsPrimary=Null OR 1, so only 1 instructor can have the value 1 per Class. Then when I want to get a list of all Classes, I can just join on Instructors_Classes.class_id WHERE IsPrimary=1 so that I get a single value for the Instructor of that class. This just feels a bit wrong but I'm not a db person so I don't know if there's a more conventional way of doing it. I thought of adding a Classes.instructor_id field but couldn't work out how to enforce the link between it and the Instructors_Classes table.

A Class can have many instructors via a standard junction table. Is there a way of designing the Instructors/Classes tables using constraints to ensure that a Class must have at least one Instructor? I.e. 1 or many instead of 0 or many? So given Classes.class_id=1, there must be an Instructors_Classes(class_id=1, instructor_id=?) Or is this something that you'd just use triggers to enforce? As a secondary, can anyone suggest a good way of identifying one, and only one Instructor as the primary instructor for a class? Currently I've added a field Instructors_Classes.IsPrimary (number) and applied a unique constraint on (class_id, IsPrimary) and a validation constraint of IsPrimary=Null OR 1, so only 1 instructor can have the value 1 per Class. Then when I want to get a list of all Classes, I can just join on Instructors_Classes.class_id WHERE IsPrimary=1 so that I get a single value for the Instructor of that class. This just feels a bit wrong but I'm not a db person so I don't know if there's a more conventional way of doing it. I thought of adding a Classes.instructor_id field but couldn't work out how to enforce the link between it and the Instructors_Classes table.
Octothalamus
(13 rep)
Jun 20, 2016, 08:56 PM
• Last activity: Jun 21, 2016, 12:14 PM
1
votes
0
answers
513
views
Can I use a Composite Key as criteria for selection in a query?
I have created a meeting minutes table and would like to use two fields as a unique ID for each meeting (field one is a meeting code (lookup from another table) for each type of meeting and field two is the meeting date - the combination would be unique for each record). An example would be ADHOC11/...
I have created a meeting minutes table and would like to use two fields as a unique ID for each meeting (field one is a meeting code (lookup from another table) for each type of meeting and field two is the meeting date - the combination would be unique for each record). An example would be ADHOC11/11/2015. I want to then set that composite key as the criteria for selecting the meeting to print a meeting minutes report.
I was able to set both fields as the composite key, but it would not let me save the table due to the "primary key cannot be null" error. Is that because one of the fields was a lookup?
I want the user to be able to select the type of meeting (code) from a drop down list, enter the meeting date, complete the remainder of meeting table fields and then be able to enter the meeting type and date combo to pull the minutes for that meeting when running the report.
What is the best way to accomplish this goal?
mlkornegay
(11 rep)
Nov 12, 2015, 04:32 PM
Showing page 1 of 6 total questions