copyright 2008 Judith A Copeland - Accessing The Database By Judi Copeland
copyright 2008 Judith A Copeland - How Does It Work Information stored in the Database Information stored in the Database API processes information API processes information Application retrieves information Application retrieves information from Database from Database through API through API
copyright 2008 Judith A Copeland - The Process
copyright 2008 Judith A Copeland - Database Options DB2 DB2 FileMaker FileMaker Firebird Firebird Microsoft Access Microsoft Access Microsoft SQL Server Microsoft SQL Server Microsoft Visual FoxPro Microsoft Visual FoxPro MySQL MySQL Oracle Oracle PostgreSQL PostgreSQL SQLite SQLite Many other choices available Many other choices available
copyright 2008 Judith A Copeland - Different Types of Data Access API JDBC JDBC FDO FDO OPC OPC Java API Java API SQL Native Client SQL Native Client Many other choices available Many other choices available
copyright 2008 Judith A Copeland - How To Connect To A Database Open VB Studio Open VB Studio Start with blank form Start with blank form In Server Explorer Window In Server Explorer Window Right click Data Connection Icon Right click Data Connection Icon Choose Data Source Choose Data Source Click appropriate source Click appropriate source Click Continue Click Continue
copyright 2008 Judith A Copeland - Continued In the Add Connection Box In the Add Connection Box Click Browse Click Browse Find appropriate database file Find appropriate database file Click on it Click on it Click Open Click Open Click Test Connection Click Test Connection Look for successful connection message Look for successful connection message Click OK Click OK
copyright 2008 Judith A Copeland - Next Step With an open connection to the database With an open connection to the database Click Data Click Data Click Show Data Sources Click Show Data Sources Data Source Window pops up Data Source Window pops up Click Data Click Data Click Add New Data Source Click Add New Data Source Data Source Configuration Window pops up Data Source Configuration Window pops up Continues Continues
copyright 2008 Judith A Copeland - Continued Select desired data connection Select desired data connection Click Next Click Next Opt for a concurrency management Opt for a concurrency management If database is on your same computer as application If database is on your same computer as application Yes for optimistic concurrency Yes for optimistic concurrency Copies original database to project folder Copies original database to project folder No for pessimistic concurrency No for pessimistic concurrency Keeps the connection open Keeps the connection open Continues Continues
copyright 2008 Judith A Copeland - Continued Save connection string Save connection string Use default name for connection string or type new name Use default name for connection string or type new name Click Next Click Next The connection string appears as app.config in Solution Explorer The connection string appears as app.config in Solution Explorer Choose Database Objects Choose Database Objects Click the objects you wish to use Click the objects you wish to use Click Finish Click Finish
copyright 2008 Judith A Copeland - You Are Now Connected Use the Toolbox to create your form Use the Toolbox to create your form Use DataGridView to display the data from database Use DataGridView to display the data from database Save and test application Save and test application