MS-Access Add Additional Linked Tables - ms-access

I have an MS-Access database that was converted to use SQL Tables using the "Microsoft SQL Server Migration Assistant 2008 for Access" (aka SSMA) and created linked tables (so the MS-Access interface still works but is linked to SQL Tables).
Modifying those tables has been no problem (modify in SQL, use the Linked Table Manager in MS-Access, update tables). But I've not added a new table in SQL and I can't find a way to add that table to the set of linked tables.
I've tried the External Data -> ODBC Database, but it wants me to make a FileDSN and since the SSMA tool didn't require that I don't want to have some tables linked one way and other files liked another way (does anyone know how SSMA links the tables?).
So my underlying question is: Without using DSN how do I add an additional SQL Server table to MS-Access as a linked table?

Related

What's an alternative to triggers when using a Jet tables in an Access Database (mdb file)?

I have this project that would require users to check in/out through a finger print reader ZK SF200.
The system that I am building needs to fetch new data that is added into this machine's database which unfortunately is a MS Access mdb file.
In my limited experience in MS Access databases, I managed to link this file to my MySql database table which allows me to manually do the insert from MS Access.
All I want to do now is to create some form of trigger that would add data to my MySql database when new rows are inserted into the MS Access table.
This problem would have been solved if the file type was .accdb because we can use After Insert events however it is an mbd type so those are not supported.
Any idea on how I can solve this matter ?
As a final note: I am willing to change DBMS in case MySql is the obstacle here. Would creating a linked server or doing sql server replication through mssql 2008 r2 work ?
EDIT: I need to insert data to MySql table because I have a trigger implemented there which does its side of logical manipulation of the data (ex: Increment the number of visits for the customer, check if customer subscription has expired or not and update the customer status accordingly)
Thank you.
Linking a table in MS-Access to the ODBC source is probably an answer for you. The table in MS-Access will be more like a view on the source table. Any DML operation (INSERT, UPDATE, DELETE) will be synced immediately with the source database. You will not need any trigger, which is not available in MS-Access (unless some VBA expert knows a solution).
The Linked table technology is default available for SQL-server, but since it uses ODBC I quess you can use it with MySQL too.

Link Access Database with Mysql Server and Use Access as Frontend [Table Issue]

I was working on an Access Application that has already an access database (tables, queries etc ) and a front end. I was trying to link access existing database tables with mysql. So, what I have done so far is, I have successfully linked the access tables with mysql using ODBC. My understanding regarding linking access table with mysql db was that, by doing so, I would have the same 'old' access table linked with mysql, but I was wrong. Instead after linking I got a new table (fields same as old) that has links with mysql database.
http://i.imgur.com/mfSF5hR.png [See this link showing old 'access' and new 'linked' table]
For instance, I had an 'Actor' table in access db (before linking) and after it I have 2 tables. One is the old access 'Actor' table and other is the new linked table named 'Actor1'. So, if I do changes in my old access table, the table in mysql doesn't get change but when I do changes in my new linked table i.e 'Actor1' changes happen in mysql table too.
Here the problem is my front end form/queries are using my access table the old one, so is there any way to use new 'linked' table without changing in the front end ?
Thanks in advance.
You just need to rename your Linked MySQL table (rename the link in Access only) so that it matches perfectly the name you were using for that same table before in Access. This way you won't have to change your forms, queries, reports.
There is no magic that happens in Access between local tables and linked tables. It's still up to you to move your data, make sure the MySQL table is designed the way you want it, maintain the links, delete old Access tables, etc.

Joinning SQL Server table with *.mdb file

I'm trying to joinning SQLServer 2008 R2 tables with msaccess table (*.mdb).
I already tried "OPENDATASOURCE" and "Linked Server", but no one of them is work correctly.
in example, I've got the following message:
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server
"TestLinkServer" returned message "Cannot open database ''. It may
not be a database that your application recognizes, or the file may be
corrupt.".
the other error message:
OLE DB provider "Microsoft.Jet.OLEDB.4.0" for linked server "MDBTest"
returned message "The Microsoft Jet database engine cannot open the
file '\10.55.56.34\Shared Folder\LBUS.mdb'. It is already opened
exclusively by another user, or you need permission to view its
data.".
and many more :D
can anyone give the working tutorial?
thanks in advance.. :)
The easiest way is to do the join inside ms-access.
Set up a table link in your access database that references the sql-server table you want to join.
Then build a query in access that joins that table with one or more tables in the access database.
If you want to join more than one sql-server table, first create a view in sql-server that combines all the relevant tables. Then set up your table link to reference the view.
If, for some reason, you must do the join inside SQL server, you will have to use a different technique, or use the table link feature to "push" data from the access table to a (previously defined) sql server table. Then, it's just an ordinary join.

SQL to ACCESS 2010

I imported my SQL information into Access. How can I create a table in Access, then join or link it to an existing table already in Access 2010.
I just use 'Access Data Projects' (ADP). This allows me to keep everything on the SQL Server side, and it allows me to write stored procedures (and bind them to forms, etc) without writing mountains of linked table / SQL passthrough code.
An easy way is to set up a UNION query. That will leave your two tables intact but join the data.
A JOIN query would merge the data into one of the existing tables.
http://stackoverflow.com/questions/38549/difference-between-inner-and-outer-joins post has some good info about that.

How to retrieve the odbc database name of tables in ms-access VBA

I have a ms-access database and several ODBC linked tables in it.
As I have 2 set of ODBC database ,one is for production the other is for development, they have different names Development and Production.
How can I get the odbc info of the linked tables by using VBA?
Using the local name of the table, you can query the MSysObjects system table (typically hidden) for the table's Foreign Name.
SELECT MSysObjects.ForeignName
FROM MSysObjects
WHERE (((MSysObjects.Name)="LocalTableName"));
If you need more information about the foreign table, try your hand at parsing the 'Connect' column from the same table.
In fact, you can use ODBC to connect to the .mdb file as if it were an Access database. The linked tables will show up in that ODBC connection and be accessible at full ODBC speeds.
The nice thing about doing it that way is your program doesn't even have to know if the tables are linked tables or not. It's nice to contain all these sysadmin-level details in a single place.
My usual method of determining the source is to rename the tables, just like you would a native table. I may add a suffix or prefix such as tblTrombone_DEV and tblTrombone_PROD.