Access The L Line The Express Line to Learning 2007 L Line L © Wiley Publishing All Rights Reserved.
Connecting with ODBC 14 * Discovering Open Database Connectivity * Making the SQL Server connection via ODBC * Connecting to a MySQL database * Connecting to file-based databases Stations Along the Way
Open Database Connectivity Acronym is ODBC Connects Access to foreign databases by using drivers Treats foreign databases as though local to Access Helps Access 2007 act as an SQL client for other relational databases
Pros and Cons of Access as an SQL Client ProsCons InexpensiveBut not free User experience baseInstallation and space requirements Accessible, affordable training Training necessary for advanced features Ubiquitous usageExclusivity to Windows Form and report capabilities Limited SQL support Intuitive interfaceAlternative clients readily available
Making the Connection to SQL Server Upsize from Access: SQL Server is enterprise-level Migrate easily: The Upsizing Wizard appears in Access Database Tools Create a link: Access connects to SQL Server databases Retain features: Access forms and reports still work Build prototypes: Test in Access before committing to SQL Server
Creating the DSN Data Source Name (DSN): Information to connect a database client to a database server DSN ComponentExample Unique nameUID=sa Hostname or IP address SERVER= TCP / IP port numberPORT=0 DriverDRIVER=SQL SERVER Database nameDATABASE=Books Table nameTABLE=dbo.Titles
Exploring MySQL through ODBC Considered the world’s most popular open-source database Source code available from its creator Connect through a MySQL Server on the network using a valid user name and password Obtain more information about MySQL at
MySQL and SQL Server Similarities Enterprise-level database solutions Commercially supported Compliant with SQL standards Client/server style databases Greatly concerned with security and data integrity Multiple versions of product available
Exploring SQLite through ODBC File-based RDBMS (like Access); not an enterprise capable client/server product Open-source, free product with source code available Command line interface or third-party graphical interface tools Connect to SQLite databases through file share or on a local computer Obtain more information about SQLite at
Connecting Access to MySQL or SQLite Download and install an appropriate ODBC driver Create the DSN Select the tables to connect with
Discussion Topics What is ODBC? Why do you use ODBC? What’s a DSN?