{"id":1893,"date":"2012-04-18T15:11:20","date_gmt":"2012-04-18T15:11:20","guid":{"rendered":"http:\/\/craftydba.com\/?p=1893"},"modified":"2012-04-18T15:33:28","modified_gmt":"2012-04-18T15:33:28","slug":"access-linked-tables","status":"publish","type":"post","link":"https:\/\/craftydba.com\/?p=1893","title":{"rendered":"Access Linked Tables"},"content":{"rendered":"<p>Today, I am going to build upon the prior <a href=\"http:\/\/en.wikipedia.org\/wiki\/ODBC\">ODBC<\/a> Connection article by showing you how to create a LINKED TABLE in <a href=\"http:\/\/en.wikipedia.org\/wiki\/Ms_access\">MS ACCESS<\/a>.  I am assuming that you have created a blank MS ACCESS 2007 database named [WILDLIFE.accdb].  I will be using the [WILD LIFE] SQL Server database that was created in a earlier <a href=\"https:\/\/craftydba.com\/?p=1421\">article<\/a> as the source of our information.<\/p>\n<p>First step is to select the external data, more, ODBC database option from the menu.  This launches the wizard which walks you thru creating a LINKED TABLE.<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/1lt-external-data-odbc.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/1lt-external-data-odbc.jpg\" alt=\"\" title=\"1lt-external-data-odbc\" width=\"686\" height=\"412\" class=\"aligncenter size-full wp-image-1895\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/1lt-external-data-odbc.jpg 686w, https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/1lt-external-data-odbc-300x180.jpg 300w\" sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/a><\/p>\n<p>Second step is to decide wether to import or link the data.  In our case, we are going to choose link.  Be careful when importing large tables.  This can be very time consuming take both Disk, CPU and Network resources.<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/2lt-linked-table.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/2lt-linked-table.jpg\" alt=\"\" title=\"2lt-linked-table\" width=\"572\" height=\"424\" class=\"aligncenter size-full wp-image-1896\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/2lt-linked-table.jpg 572w, https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/2lt-linked-table-300x222.jpg 300w\" sizes=\"auto, (max-width: 572px) 100vw, 572px\" \/><\/a><\/p>\n<p>Third step is to select the ODBC connection we created for the SQL Server database.<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/3lt-select-odbc-source.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/3lt-select-odbc-source.jpg\" alt=\"\" title=\"3lt-select-odbc-source\" width=\"462\" height=\"407\" class=\"aligncenter size-full wp-image-1897\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/3lt-select-odbc-source.jpg 462w, https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/3lt-select-odbc-source-300x264.jpg 300w\" sizes=\"auto, (max-width: 462px) 100vw, 462px\" \/><\/a><\/p>\n<p>Fourth step is to choose that table that we want to link in.  In our case, we are going to choose [ANIMALS].<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/4lt-select-table.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/4lt-select-table.jpg\" alt=\"\" title=\"4lt-select-table\" width=\"481\" height=\"464\" class=\"aligncenter size-full wp-image-1898\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/4lt-select-table.jpg 481w, https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/4lt-select-table-300x289.jpg 300w\" sizes=\"auto, (max-width: 481px) 100vw, 481px\" \/><\/a><\/p>\n<p>Fifth step is to choose an combination of fields that uniquely defines the table.  This is where most users go wrong.  The primary key should be selected at this point.<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/5lt-select-index.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/5lt-select-index.jpg\" alt=\"\" title=\"5lt-select-index\" width=\"330\" height=\"307\" class=\"aligncenter size-full wp-image-1899\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/5lt-select-index.jpg 330w, https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/5lt-select-index-300x279.jpg 300w\" sizes=\"auto, (max-width: 330px) 100vw, 330px\" \/><\/a><\/p>\n<p>Sixth step is to test the LINKED TABLE by right clicking and selecting open.<\/p>\n<p><a href=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/6lt-success.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/6lt-success.jpg\" alt=\"\" title=\"6lt-success\" width=\"607\" height=\"547\" class=\"aligncenter size-full wp-image-1900\" srcset=\"https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/6lt-success.jpg 607w, https:\/\/craftydba.com\/wp-content\/uploads\/2012\/04\/6lt-success-300x270.jpg 300w\" sizes=\"auto, (max-width: 607px) 100vw, 607px\" \/><\/a><\/p>\n<p>As you can see, the task of creating a LINKED TABLE in MS ACCESS is very easy.  The main pitfall of most users is not selecting the primary key.  This can lead to FULL TABLE scans in the worst case scenerio.  <\/p>\n<p>Next time, I will demonstrate how a LOGON TRIGGER can preventing unwanted applications, such as MS Access, from connecting to the server.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Today, I am going to build upon the prior ODBC Connection article by showing you how to create a LINKED TABLE in MS ACCESS. I am assuming that you have created a blank MS ACCESS 2007 database named [WILDLIFE.accdb]. I will be using the [WILD LIFE] SQL Server database that was created in a earlier article as the source of our information. First step is to select the external data, more, ODBC database option from the menu. This launches the wizard which walks you thru creating a LINKED TABLE. Second&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[12,415,414,15,413,412,409,28,411],"class_list":["post-1893","post","type-post","status-publish","format-standard","hentry","category-other","tag-free-code","tag-full-table-scan","tag-import-table","tag-john-f-miner-iii","tag-linked-table","tag-ms-access","tag-odbc","tag-sql-server","tag-system-dsn"],"_links":{"self":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/posts\/1893","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1893"}],"version-history":[{"count":0,"href":"https:\/\/craftydba.com\/index.php?rest_route=\/wp\/v2\/posts\/1893\/revisions"}],"wp:attachment":[{"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1893"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1893"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/craftydba.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1893"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}