W04 Connecting 3rd Party Application to ODBC By Michael H. Penrod Senior Database Administrator Product Development
Introduction – Who am I? Product Development DBA Have worked with SQL for 13 years Have worked with: Microsoft SQL Server 6.5, 7.0, 2000 Oracle 4, 5, 6, 7, 8, 9 Sybase System 11 SQL Anywhere AS400 DB2 Microsoft Certified Professional Created the DSU / Maintain the DDU
Introduction – Who are you? EX, CX, PX, QX, TE? ICS? Microsoft SQL Server, Sybase, Oracle, Informix, DB2?
Prerequisites You must have the RDBMS client software loaded on the workstation that you are using. This is software provided by the RDBMS vendor to allow connections to their RDBMS.
Creating an ODBC Datasource Datasource is also referred to as a DSN We will look at: Microsoft SQL Server 7.0/2000 Oracle 7 Oracle 9 Sybase System 11
First Step: Open ODBC Administrator Found in your Control Panel, under Administrative Tools For EX customers, can also be found in the EX Program folder
First Step: Open ODBC Administrator User, System, or File?
First Step: Open ODBC Administrator Click Add
First Step: Open ODBC Administrator Select the RDBMS that you want Click Finish
Microsoft SQL Server 7.0/2000 ODBC A multi-page wizard
Microsoft SQL Server 7.0/2000 ODBC
Microsoft SQL Server 7.0/2000 ODBC
Microsoft SQL Server 7.0/2000 ODBC
Microsoft SQL Server 7.0/2000 ODBC
Microsoft SQL Server 7.0/2000 ODBC
Oracle Your System Administrator must have a tnsnames.ora and sqlnet.ora files created,and loaded on the workstation, in addition to the RDBMS client software
Oracle 7 Simple, no-frills, three entries Use @TNS: in the SQL*Net Connect String
Oracle 9 More complex, more options
Oracle 9
Oracle 9
Oracle 9
Oracle 9
Sybase System 11 Use the DSEdit program, from Sybase, enter your installation information. Your System Administrator will have to provide this information.
Sybase System 11 Enter the Name, Server, and Database Name All other information is usually optional
Ready to use the Third Party Application Now that the ODBC connection has been created, you are ready to use the third party application against the RDBMS.
Using Microsoft Excel Open Microsoft Excel Under the Data menu, choose Get External Data, New Database Query
Using Microsoft Excel Select your ODBC connection, and click OK
Using Microsoft Excel Enter your password
Using Microsoft Excel Pick the Table Expand to see the columns Select the column Use the arrows to move them to the right-hand column Click Next
Using Microsoft Excel Enter the Where criteria
Using Microsoft Excel Select the Sort Order
Using Microsoft Excel Select what to do with the data output
Using Microsoft Excel Indicate where to place the data in Excel, then wait for the data to be returned
Using Microsoft Excel
Using Microsoft Access Open Access Choose to use a blank Access database
Using Microsoft Access Give the database a name
Using Microsoft Access Now you have a choice to make Right Click and choose Import the Table into Access OR Link the table to the actual database
Using Microsoft Access - Import Select where to import from Choose ODBC
Using Microsoft Access - Import Select your ODBC datasource
Using Microsoft Access - Import Login
Using Microsoft Access - Import Select the Table(s)
Using Microsoft Access - Import A copy of the table is now in Access. Changes made here will NOT be made to the real database.
Using Microsoft Access - Import
Using Microsoft Access – Linked Table Select where to link to Choose ODBC
Using Microsoft Access – Linked Table Select your ODBC datasource
Using Microsoft Access – Linked Table Login
Using Microsoft Access – Linked Table Select the table(s) to link
Using Microsoft Access – Linked Table A link to the table is now in Access. Changes made here WILL be made to the real database.
Using Microsoft Access – Linked Table
Demonstration
Need More Information? Contact your System Administrator Excel Help Access Help
Questions???
Thank You! Thank You for attending this session. Please fill out an evaluation form.