Preview

Visual Basic Tutorial

Satisfactory Essays
Open Document
Open Document
1968 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Visual Basic Tutorial
Database Tutorial in Visual Basic.NET
The first thing you'll need is a database. Use Access to create this database; it consists of a few simple fields in the tbl_master table: • EmployeeID • FirstName • LastName • Location
Create this table in Access: (Safer, download it from My Subjects>Sample Database)
|tbl_master |
|EmployeeID |FirstName |LastName |Location |
|1 |Green |Frogg |Somerville |
|2 |Kay |Park |Kalinga |
|3 |Rover |Dog |Albany |
|5 |Gabby |Kase |England |
|6 |Neil |Furman |England |
|9 |Zaza |Gabor |Goonville |
|11 |BeBe |Gabor |Loonville |
|19 |Rebecca |Black |Mars |
| | | | |

Save to D:\My Documents (not a subdirectory) as sample.mdb. Close Access.
Part 1
Open a new Windows application in VB.Net. You will be creating a simple Form for navigating through the records in the table.
Start by placing three labels, three textboxes, and four buttons on a form as shown in the following figure. Name the textboxes txtFirstName, txtLastName, and txtLocation. The buttons should be self explanatory as well: btnFirst, btnPrevious, btnNext, and btnLast.
[pic]
Double click on the Form. Now you can begin the coding. Import the System.Data.OleDb namespace.
Imports System.Data.OleDb right at the top!

Declare a dataset at the class level, under Public Class Form1

Dim ds As New DataSet()
In the Form's Load event, fill the dataset. To do this, create a DataAdapter and use its Fill() method to fill up the dataset.
Dim conn As New OleDbConnection()

You May Also Find These Documents Helpful

  • Better Essays

    Microsoft Access Tutorial. (2005). Reports I: Show off your data. Retrieved on July 16, 2005 from http://office.microsoft.com/training/training.aspx?AssetID=RC010780631033.…

    • 2384 Words
    • 10 Pages
    Better Essays
  • Satisfactory Essays

    In this assignment, you will learn to create an Access database from a given ERD. To complete this assignment, you will need to be able to run Access 2010, either through Citrix or installed on your workstation or laptop.…

    • 694 Words
    • 4 Pages
    Satisfactory Essays
  • Satisfactory Essays

    learn the concepts behind the questions rather than be a strict memorization tool. Repeated readings will…

    • 4560 Words
    • 19 Pages
    Satisfactory Essays
  • Good Essays

    This is our first individual assignment for Programming unit this semester. This assignment was given in December 2013, and submission date is on 10th February 2014.…

    • 1859 Words
    • 8 Pages
    Good Essays
  • Powerful Essays

    Pt1420 Unit 1 Assignment 2

    • 1305 Words
    • 6 Pages

    Das, D., Gregersen, E., Hosch, L., Lotha, G., Sampaolo, M., Sinha, S. (2014). C++. In Encyclopedia Britannica.…

    • 1305 Words
    • 6 Pages
    Powerful Essays
  • Powerful Essays

    Unit 18 - Database P1, M1

    • 995 Words
    • 4 Pages

    Form is used for collect and edits information and transfers them to table. It is similar to application forms that allow user to fill in or delete their data easily and it also able to let user design own user interface. User can insert as much control as they like to build the user interface beautifully.…

    • 995 Words
    • 4 Pages
    Powerful Essays
  • Satisfactory Essays

    Ilab Instructions

    • 2258 Words
    • 10 Pages

    You will then open an existing Access database to explore database objects and to experiment with simple data manipulation using filters and sorts and to begin elementary work with relationships.…

    • 2258 Words
    • 10 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Bis/220 Proposal

    • 315 Words
    • 2 Pages

    Microsoft Access is a system that allows users to manipulate large amounts of data. The different areas and features of Microsoft provide quick learning and easy to use software which can benefit both small and large business environments. The different parts that make up Access are queries, reports, tables, modules and macros. Queries allow the user to pull information from the given tables and calculate using the information filled into the table. Tables associated with Access are used to store data. Information on the tables can be entered on the forms and printer-ready information is displayed on the report portion of Access, These reports can also be exported to Microsoft Excel or Word. The automation of database tasks are done using macros. Modules are used for advanced programming within the database. Microsoft Access is beneficial in the work environment because it incorporates features that are also found in other Microsoft Office applications, the learning curve with Access is not steep at all it is a very easy system to operate. Because of wizards, it is easier to create a database in less than an hour. Another benefit of Access is that it allows the user to integrate large amounts of data not having to sacrifice performance of the system. Information that has already been made available can be transferred over to the Access program. Microsoft Access can e used for both small and large business environments. However, a large office environment allows access to be programmed from the enterprise resource software.…

    • 315 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    SQL Queries

    • 423 Words
    • 2 Pages

    Given the table information above, if you were asked to create an Access query that showed the Student Name and Grade for all students taking a class in Room H201, what tables would you need and how would you link them together?…

    • 423 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Bis 220 Wk 4

    • 526 Words
    • 3 Pages

    Microsoft Access has evolved into very user friendly tool and has become simple to learn. It provides for the easier adding, subtracting, and altering of data once the database. Access offers the ability to construct queries to extract reports from the database to analyze all aspects of the data captured in the database (Grauer, 2011). Whereas this is possible in Excel, it is much more cumbersome. Access also offers the ability for more than one user to update tables at the same time but will not allow for the updating of one record by two individuals at the same time.…

    • 526 Words
    • 3 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Analyzing Data Checkpoint

    • 359 Words
    • 2 Pages

    The first step is to determine exactly what analyzes you want to perform and ensure that you gather all that is needed. Keep in mind to import into Access it has to be formatted properly as an excel document. The second step is to create a database. This can be done by opening Access and creating a blank database (file, new, blank database). You will be prompted to name the database and where you would like to save it. Step three is to edit and validate all data. Be sure to have a primary key and that all data is valid. If the data were imported without, identifying a primary key or the data is “dirty” or not valid these issues can be addressed by using the utility queries in Access. The fourth step is to connect data files. When multiple data files have been imported into tables, edited, and validated, you need to connect the tables by creating relationships. Typically, a relationship connects a primary key in one table to a regular field in another table. For example, the Customer Number in the Customers table (a primary key) can be connected to the Customer Number field in the Sales table. You also need to establish a relationship between the matching fields in original tables and their validating tables. In our example, you would establish a relationship between the Customer Type field in the Customers table and the Customer Type field in the Customer Types table. Repeat this step for all validating tables.…

    • 359 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Using Adobe FormsCentral to create, edit, and distribute forms was easy and made the task a breeze. I have already started my next forms project, although it is a much more complicated form. I expect, however, that it will be just as simple to set up and once completed, will allow me to (ii) provide a more user-friendly form for my coworkers to use when submitting their Contract Requests and (ii) easily integrate the data with my Contracts database.…

    • 327 Words
    • 2 Pages
    Good Essays
  • Good Essays

    Using Microsoft Excel

    • 4305 Words
    • 18 Pages

    1) Create a new workbook in Excel and create a table like the one below.…

    • 4305 Words
    • 18 Pages
    Good Essays
  • Good Essays

    Crystal Report with Image

    • 551 Words
    • 3 Pages

    Create a dataset using the fields you want to display in crystal report. Define the image field as hexaBinary datatype.…

    • 551 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    ATM sample program

    • 1001 Words
    • 5 Pages

    cmd.CommandText = "SELECT * FROM Account WHERE Username = '" & txt_user.Text & "' and Password = '" & txt_pin.Text & "'"…

    • 1001 Words
    • 5 Pages
    Satisfactory Essays

Related Topics