WORKING WITH FILES, MENUS AND DATABASES IN VISUAL BASIC BY V. V. SUBRAHMANYAM.

Slides:



Advertisements
Similar presentations
MS-Access XP Lesson 1. Introduction to MS-Access Database Management System Software (DBMS) Store data in databases Database is a collection of table.
Advertisements

Tutorial 8: Developing an Excel Application
Tutorial 12: Enhancing Excel with Visual Basic for Applications
Miscellaneous Windows 2000 Desktop Features Windows 2000 Intermediate.
Chapter 12: Using ADO.NET 2.0 Programming with Microsoft Visual Basic 2005, Third Edition.
Guide to Oracle10G1 Introduction To Forms Builder Chapter 5.
Chapter 1 Databases and Database Objects: An Introduction
1 Chapter 12 Working With Access 2000 on the Internet.
The ADO Data Control. Universal Data Access Open Database Connectivity (ODBC) –standard for accessing data in databases OLE-DB –allows access to data.
Using Visual Basic 6.0 to Create Web-Based Database Applications
A Guide to Oracle9i1 Introduction To Forms Builder Chapter 5.
Exploring Office Grauer and Barber 1 Creating More Powerful Applications: Introduction to VBA(Wk9)
Access Tutorial 1 Creating a Database
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Copyright 2003 : Ismail M.Romi, PPU. All Rights Reserved 1 Lab10 Interacting with Data (Database Management)
Using the Visual Basic Editor Visual Basic for Applications 1.
Database Programming (using ADO) Universal Data Access – Microsoft strategy for providing access to information across the enterprise. – UDA provides high-performance.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
Tutorial 1 Creating a Database. Objectives Learn basic database concepts and terms Learn basic database concepts and terms Explore the Microsoft Access.
Microsoft Visual Basic 2005 ENRICHMENT CHAPTER Visual Studio Tools for Office.
Saving and Loading Simple Text Files A sequential file stores characters one after the other like songs on a cassette tape. New characters are added to.
Microsoft Office 2013 ®® Managing Your Files. XP Objectives Explore the differences between Windows 7 and Windows 8 Plan the organization of files and.
CHAPTER 9 DATABASE MANAGEMENT © Prepared By: Razif Razali.
Microsoft Office 2003 Illustrated Introductory with Programs, Files, and Folders Working.
Programming with Microsoft Visual Basic 2012 Chapter 13: Working with Access Databases and LINQ.
XP New Perspectives on Introducing Microsoft Office XP Tutorial 1 1 Introducing Microsoft Office XP Tutorial 1.
Handling of data from multiple databases. Visual Basic Database Visual Basic application acts as a front-end to the database Visual Basic application.
Copyright © 2001 by Wiley. All rights reserved. Chapter 10: Advanced Database Operations Revising Vintage Videos Setting RecordSource at run time DBGrid.
Chapter 1 Databases and Database Objects: An Introduction
Using Visual Basic 6.0 to Create Web-Based Database Applications
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
Introduction To Windows Operating Systems Manipulating Windows GUI
Microsoft Visual Basic 2010: Reloaded Fourth Edition Chapter Twelve Access Databases and LINQ.
Microsoft Access Lesson 1 Lexington Technology Center February 11, 2003 Bob Herring On the Web at
Automating Database Processing Chapter 6. Chapter Introduction Design and implement user-friendly menu – Called navigation form Macros – Automate repetitive.
With Windows 7 Introductory© 2011 Pearson Education, Inc. Publishing as Prentice Hall1 Windows 7 Introductory Chapter 2 Managing Libraries Folders, Files.
Workbench Overview Dwight Deugo Nesa Matic
XP New Perspectives on Integrating Microsoft Office XP Tutorial 2 1 Integrating Microsoft Office XP Tutorial 2 – Integrating Word, Excel, and Access.
Visual Basic.NET Comprehensive Concepts and Techniques Chapter 7 Using Menus, Common Dialogs, Procedures, Functions, and Arrays.
Key Applications Module Lesson 21 — Access Essentials
Computer Literacy BASICS: A Comprehensive Guide to IC 3, 5 th Edition Lesson 23 Getting Started with Access Essentials 1 Morrison / Wells / Ruffolo.
What is database?  Any Method for access info into Application from DataBase?  ODBC is standard for Accessing Data.  Problem with ODBC:  Information.
Microsoft Access 2000 Presentation 1 The Basics of Access.
® Microsoft Office 2013 Access Creating a Database.
Tutorial 91 Databases A database is an organized collection of related information stored in a file on a disk A database allows companies to store information.
Unit 5, Lesson 1 Working with Databases. Objectives Identify the parts of the Access screen. Identify the parts of the Access screen. Understand the purpose.
Chapter Thirteen Working with Access Databases and LINQ Programming with Microsoft Visual Basic th Edition.
3 Copyright © 2004, Oracle. All rights reserved. Working in the Forms Developer Environment.
Chapter 23. Copyright 2003, Paradigm Publishing Inc. CHAPTER 23 BACKNEXTEND 23-2 LINKS TO OBJECTIVES Record, Run, Pause, and Delete Macros Record, Run,
Visual Basic for Application - Microsoft Access 2003 Programming applications using Objects.
XP New Perspectives on Microsoft Office FrontPage 2003 Tutorial 7 1 Microsoft Office FrontPage 2003 Tutorial 8 – Integrating a Database with a FrontPage.
INTRODUCTION TO ACCESS. OBJECTIVES  Define the terms field, record, table, relational database, primary key, and foreign key  Create a blank database.
The world leader in serving science Overview of Thermo 21 CFR Part 11 tools Overview of software used by multiple business units within the Spectroscopy.
Chapter 24 I’m Suffering from Information Overload (Access Databases) Clearly Visual Basic: Programming with Visual Basic nd Edition.
CONTROL STATEMENTS. A conditional expression uses a comparison operator which results in true or false value. If the comparision is valid it results in.
Module 2 Part II Introduction To Windows Operating Systems Manipulating Windows GUI Introduction To Windows Operating Systems Manipulating Windows GUI.
Banner 6.x Fundamentals: Navigation and Forms. n Name n Organization n Title/function n Job responsibilities n SCT Banner Experience n Expectations Introductions.
1 Lesson 9 Windows Management Computer Literacy BASICS: A Comprehensive Guide to IC 3, 3 rd Edition Morrison / Wells.
Microsoft Visual Basic 2012: Reloaded Fifth Edition Chapter One An Introduction to Visual Basic 2012.
Chapter 2: The Visual Studio.NET Development Environment Visual Basic.NET Programming: From Problem Analysis to Program Design.
COMPREHENSIVE Excel Tutorial 12 Expanding Excel with Visual Basic for Applications.
Microsoft Visual Basic 2010: Reloaded Fourth Edition
Chapter 2: The Visual Studio .NET Development Environment
Working in the Forms Developer Environment
1. Introduction to Visual Basic
Microsoft Access Illustrated
CIS16 Application Development Programming with Visual Basic
Chapter 4 Enhancing the Graphical User Interface
Chapter 4 Enhancing the Graphical User Interface
Unit – V Data Controls.
Presentation transcript:

WORKING WITH FILES, MENUS AND DATABASES IN VISUAL BASIC BY V. V. SUBRAHMANYAM

Working with files Visual Basic File System Controls DriveList Box DirList Box FileList Box

DriveList Box control Is a drop down list box Displays the list of drives on your computer The change is recorded in Drive property of the DriveList Box

DirList Box Control It is a Drop down list box Displays the hierarchical list of Directories in the current drive

FileList Box It is a Drop down list box Displays all files in the current directory or folder and also allows the user to set up search criteria for files

Advantages of file system controls These three controls used together can create an elegant interface that will allow the user to locate a file on his computer

Private Sub Dir1_Change() File1.Path = Dir1.Path End Sub Private Sub Drive1_Change() Dir1.Path = Drive1.Drive End Sub Private Sub Text1_Change() File1.Pattern = Text1.Text End Sub

File functions ChDrive - Changes the current logged drive ChDir - Changes the default directory MkDir - Creates a new directory RmDir - Deletes a directory Name - Renames a file

Contd… Kill - Deletes a file FileCopy - Copies a file from src to des FileDateTime – Returns the date and time when the file was modified GetAttr - Returns the attributes of a file as an integer value SetAttr - Sets the attributes of a file

Menus Contains a no. of options, logically organized and easily accessible. In VB Menus can be created using the Menu Editor Menu is tied to a form.

Menu Conventions Keep menu captions short and simple Follow the Windows conventions while naming and ordering the menu items Keep the list of menu items short Use separators to logically group menu options Provide necessary keyboard shortcuts

Multiple Document Interface (MDI) MDI was designed for applications which need to show more than one document(multiple documents) at the same time, with each document displayed in its own window.

Why MDI forms? MDI form acts like a container for the other forms in the application Most of the control buttons and code for the various forms can be shared Reduces the no. of controls

MDI Application An application can have only one MDI form One or more MDI Child Form(s) Optionally independent forms and modules

Data Base It is a collection of records stored in tables. Information is stored in tabular form and is called a table. Columns  Fields Rows  Records The collection of the tables is called as database and are stored in a file.

Three categories of databases Visual Basic recognizes 3 categories of databases Visual basic database External databases ODBC databases

Creating a table You can create your own tables using –DAO(Data Access Objects) –Microsoft Access and others –Visual Data Manager

Visual Data Manager Visual Data manager makes the job of table creation and modification very simple. This can work with MS-Access, Dbase, Paradox and text files also.

Data Control Establishes a connection to a database Returns a set of records from the database Enables you to move from record to record Enables you to display and manipulate data from the records in bound controls

Properties to be set to Data control Two properties to be set at runtime or design time are: DatabaseName: Specifies the name of the database that must be opened RecordSource: Specifies the name of the table(s) of the database from which the data has to be extracted

Data-Aware Control It is the control that provides access to a specific field in a database through a data control.This can be bound to a data control through its data source and data field properties.

DBlist, Dbcombo and Dbgrid These controls are all capable of managing sets of records when bound to a Data Control. All of these controls permit several records to be displayed or to be manipulated at a time.

`Object Linking and Embedding(OLE) To create an application that can display data from many different applications and enables the user to edit that data from with in the application in which it was created.

OLE DB It is defined as a new low-level interface that is part of the Universal Data Access platform. It is general purpose set of interfaces designed to let developers build data access tools as components using the COM.

Additional Controls Sstab control Provides an easy way of presenting several dialogs or screens of information on a single form, using the same interface seen in many commercial Windows applications.

ImageList control This control acts like a repository of images for the other controls

MSFlexGrid control This displays and operates on data in a table form

Toolbar Control This is used to create a toolbar for the application, just like Toolbars for applications like Word or Excel or others.

Statusbar Control This control holds up to a maximum of sixteen panels or frames each of these panel given different types of information like time, microhelp, status of a key etc..

Treeview Control To display the data as a hierarchy. It displays the drives, directories, subdirectories and files in the form of a hierarchy.

ActiveX Data object This enables the client applications to access and manipulate data in a database serer through any of the OLE DB providers.

Benefits of ADO Ease of use High speed Low memory overheads Small disk footprint

ADO support ADO support key features for building client/server and Web-based applications.

BUG The error or the problem occurred in the system is called as a bug

Debugging The process of finding out and removing the error is called debugging.

Types of Bugs Errors of syntax Logical errors Runtime Errors

Debugging Methods The Message box Debug.print Debug Toolbar Error Handler

Message Box To display the state of values that have been assigned to a variable Dim I as integer For I = 1 to 20 step 4 MsgBox I Next I

Debug.print The debug object will send the output to the immediate window. Dim I as integer For I = 1 to 20 Step 4 Debug.print I Next I

Debug Toolbar To begin debugging, Debug Toolbar is required. To bring up, right click the toolbar and select Debug from the pop-up menu

Error handler It is a routine that traps errors and directs the user or the program to perform a certain task to overcome the error.