Download presentation
Presentation is loading. Please wait.
Published byBrett Bell Modified over 9 years ago
1
copyright 2008 Judith A Copeland - http://www.webprogramminglounge.com Accessing The Database By Judi Copeland
2
copyright 2008 Judith A Copeland - http://www.webprogramminglounge.com 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
3
copyright 2008 Judith A Copeland - http://www.webprogramminglounge.com The Process
4
copyright 2008 Judith A Copeland - http://www.webprogramminglounge.com 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
5
copyright 2008 Judith A Copeland - http://www.webprogramminglounge.com 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
6
copyright 2008 Judith A Copeland - http://www.webprogramminglounge.com 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
7
copyright 2008 Judith A Copeland - http://www.webprogramminglounge.com 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
8
copyright 2008 Judith A Copeland - http://www.webprogramminglounge.com 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
9
copyright 2008 Judith A Copeland - http://www.webprogramminglounge.com 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
10
copyright 2008 Judith A Copeland - http://www.webprogramminglounge.com 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
11
copyright 2008 Judith A Copeland - http://www.webprogramminglounge.com 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
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.