chap13 - Chapter 13 Introduction to Data Access Classes and...

Info icon This preview shows pages 1–13. Sign up to view the full content.

View Full Document Right Arrow Icon
Object-Oriented Application Development Using VB .NET 1 Chapter 13 Introduction to Data Access Classes and Persistence
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Object-Oriented Application Development Using VB .NET 2 Objectives In this chapter, you will: Examine VB .NET input and output (I/O) Make objects persistent Design a data access class Communicate with a data access class Use a relational database with VB .NET
Image of page 2
Object-Oriented Application Development Using VB .NET 3 Examining VB .NET Input and Output Stream A collections of bytes that transfer data to and from files Stream classes with sequential file capabilities StreamWriter Located in the System.IO namespace Derived from the TextWriter class StreamReader Located in the System.IO namespace Derived from the TextReader class
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Object-Oriented Application Development Using VB .NET 4 Examining VB .NET Input and Output In a file-based system A file Represents the collection of all the data A file consists of records A record Represents a single entity A field An attribute that will be included for each record in the file A record consists of fields
Image of page 4
Object-Oriented Application Development Using VB .NET 5 Sequential File Processing Sequential file processing example Text boxes Allow users to enter values for each record to be saved to a sequential file Names of the text boxes txtStRegNo txtLength txtManufacturer txtYear txtCustPhoneNo
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Object-Oriented Application Development Using VB .NET 6 Sequential File Processing Sequential file processing example (continued) Buttons Save To File button Clicked to save the text box values to a sequential file List Records button Clicked to extract the data from the file and display the results in a multiline text box with a vertical scroll bar Exit button Closes the program
Image of page 6
Object-Oriented Application Development Using VB .NET 7 Sequential File Processing
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Object-Oriented Application Development Using VB .NET 8 General Format for StreamWriter and StreamReader The boat attribute file example Uses the following methods of the StreamWriter class Write WriteLine Close Uses the following methods of the StreamReader class Read ReadLine ReadToEnd Peek Close
Image of page 8
Object-Oriented Application Development Using VB .NET 9 General Format for StreamWriter and StreamReader
Image of page 9

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Object-Oriented Application Development Using VB .NET 10 Adding Toolbars and Dialog Controls Dialog boxes and toolbars Used to build professional user interfaces To incorporate a toolbar with graphic buttons on a form Place the graphic images into the ImageList control Add the toolbar control to the form Link the toolbar’s ImageList property to the ImageList
Image of page 10
Object-Oriented Application Development Using VB .NET 11 Adding Toolbars and Dialog Controls
Image of page 11

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Object-Oriented Application Development Using VB .NET 12 Adding Toolbars and Dialog Controls
Image of page 12
Image of page 13
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern