Accessing Data within Your Application<br />Advanced Visual Basic<br />
Overview<br />The management of databases is the number one use of computers today. A database (or relational database) is a collection of one or more (usually related) tables that has been created with database-management software. For our course, we will be using Microsoft Access for the database management software. We can connect our applications to databases using ADO.NET (ActiveX Data Objects .NET). This technology allows programs to access data seamlessly from multiple, varied, and distant servers. <br />
Wizards vs. ADO<br />Our text and Microsoft recommend the use of database wizards to complete the connections and management of data. However, there is another way. You can connect to databases in code and be in complete control of what is happening within your application. This is what I prefer because if I can't see the code to a process, I can't debug it! Does the wizard have a place in programming? SURE! I do not use it at all professionally, but I can see the wizards having a place within small applications.<br />vs.<br />
How does ADO work?<br />Connection – This uses a connection string to say how we will connect to data and what format the data is in<br />Data Adapter – Converts database code to VB code (to simplify process). …. Populates dataset with data<br />Data Set – Snapshot of data when you read it from the database<br />Command Builder – Allows you to add, edit, delete data<br />
Bind Controls?<br />ADO wizard allows you to bind controls. This is a real easy way of displaying information, but does complicate review of data and verification of accuracy. <br />You can bind controls as well using ADO in code, but I find it just as easy to create a process to read and write to the controls.<br />
DataGridView Control<br />The datagridview control is a very popular method of displaying information in a VB application. You may bind to this control or add/edit items in code.<br />
Database Interaction<br />Question: <br />Where have you recently seen a database interaction application?<br />
Additional Information<br />For additional information about these topics, please review your text and the links provided in Blackboard.<br />
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.