Software Development with Visual Basic
Total Page:16
File Type:pdf, Size:1020Kb
B.Com. (C.A.) Third Year Core Paper No. 14 SOFTWARE DEVELOPMENT WITH VISUAL BASIC BHARATHIAR UNIVERSITY SCHOOL OF DISTANCE EDUCATION COIMBATORE – 641 046 1 (Syllabus) B.Com. (Computer Applications) – III Year Core Paper-14 SOFTWARE DEVELOPMENT AND VISUAL BASIC Objectives : To enable the students to develop a front end tool for Customer Interaction in Business. UNIT – I Introduction – Client/Server – Benefits of Client/Server – Downsizing – Upsizing- Right sizing – Client/Server Models – Distributed Presentation – Remote Presentation – Remote Data – Distributed Logic – Distributed Data – Client/Server Architecture – Technical Architecture – Application Architecture – Two Tier Architecture – Three Tier Architecture OLTP & n Tier Architecture. UNIT – II Introduction to Visual Basic – Steps in VB Application – Integrated Development Environment (IDE) – Menu Bar – Tool Bar – Project Explorer Window – Property Window – Toolbox – Properties, Methods and Events – Event Driven Programming – Working with Forms – Variables – Scope of Variables – Constants – Data Types. UNIT – III Functions – Procedures – Control Structure : If – Switch – Select – For – While – Do While – Arrays – User Defined Data Types – Data Type Conversions – Operators – String Functions – Data and Time Functions. UNIT – IV Creating and Using Standard Controls : Form, Label, Text box, Command Button, Check Box, Option Button, List Box, Combo Box, Picture Box, Image Controls, Scroll Bar – Drive List Box – Directory List Box – Time Control, Frame, Shape and Line Controls – Control Arrays – Dialog Boxes – Single Document Interface (SDI) – Multiple Document Interface (MDI) – Menu – Menu Editor – Menu Creation. UNIT – V Data Controls – Data Access Objects (DAO) – Accessing and Manipulating Database – Recordset – Type of Recordset – Creating a Recordset – Modifying, Deleting Records – Finding Records – Data Report – Data Environment – Report – Designer – Connection Object – Command Object – Section of the Data Report Designer – Data Report Controls. 2 CONTENT Lessons PAGE No. UNIT-I 1 Client Server Technology : An Introduction 4 UNIT-II 2 Introduction to Visual Basic 35 3 Integrated Development Environment (IDE) 42 4 Methods and Events 51 UNIT-III 5 Functions 72 6 Define Control Structures 81 7 Arrays 102 8 Operators 110 UNIT-IV 9 Using Standard Controls 122 10 Other Controls 141 11 Timer Controls 152 UNIT-V 12 Using Data Controls 166 13 Record Set 184 14 Data Report 193 3 UNIT - I LESSON-1 CLIENT SERVER TECHNOLOGY : AN INTRODUCTION 1.1 INTRODUCTION The term client/server was first used in the 1980s in reference to personal computers (PCs) on a network. The actual client/server model started gaining acceptance in the late 1980s. The client/server software architecture is a versatile, message-based and modular infrastructure that is intended to improve usability, flexibility, interoperability, and scalability as compared to centralized, mainframe, and time sharing computing . Client/server describes the relationship between two computer programs in which one program, the client, makes a service request from another program, the server, which fulfils the request. Although programs within a single computer can use the client/server idea, it is a more important idea in a network. In a network, the client/server model provides a convenient way to interconnect programs that are distributed efficiently across different locations. Computer transactions using the client/server model are very common. For example, to check your bank account from your computer, a client program in your computer forwards your request to a server program at the bank. That program might in turn forward the request to its own client program that sends a request to a database server at another bank computer to retrieve your account balance. The balance is returned back to the bank data client, which in turn serves it back to the client in your personal computer, which displays the information for you. Nearly all the major online information and e-commerce services (sites such as Amazon.com, eBay, Yahoo, MSN, and more) follow the client-server file sharing model. On a smaller scale, most campus services (such as NetFiles, Express Email, Illinois Compass, and Banner) also follow the client-server file sharing model. 4 1.2 DEFINITIONS There are a variety of definitions for the term client/server. The client/server system is defined in terms of individual pieces that work together as a whole and viewed as a system that integrates hardware, software, and networking. This integration of technology is specifically designed to share resources, in support of one or more business functions, in multiple locations simultaneously. As an example is the Internet itself is the world’s largest client/server system. This client/server system is comprised of thousands of clients and servers transferring information and supporting millions of business functions across a network that spans the globe. 1.3 ADVANTAGES OF CLIENT/SERVER ARCHITECTURE The client/server model is particularly recommended for networks requiring a high degree of reliability, the main advantages being: centralised resources: given that the server is the centre of the network, it can manage resources that are common to all users, for example: a central database would be used to avoid problems caused by redundant and inconsistent data improved security: as the number of entry points giving access to data is not so important server level administration: as clients do not play a major role in this model, they require less administration scalable network: thanks to this architecture it is possible to remove or add clients without affecting the operation of the network and without the need for major modification 1.4 DISADVANTAGES OF THE CLIENT/SERVER MODEL Client/Server architecture also has the following drawbacks: increased cost: due to the technical complexity of the server a weak link: the server is the only weak ling in the client/server network, given that the entire network is built around it! Fortunately, the server is highly fault tolerant (primarily thanks to the RAID system) 1.5 CLIENT/SERVER SYSTEM OPERATION A client/server system operates as outlined in the following diagram: 5 The client sends a request to the server using its IP address and the port, which is reserved for a particular service running on the server. The server receives the request and responds using the client IP address and port . Every client/server systems consists of at least one of each of the following: A client that requests information; A server that supplies information; A network that transfer information between the client and the server; The client component of the client/server system can be either hardware or software. In the hardware context, a client is the personal computer functioning as a workstation. This client workstation is capable of stand-alone information processing, which distinguishes it from its mainframe predecessor, the dumb terminal. In the software context, a client is the software that allows to interact with the information residing on the server. Web browsers are examples of software clients, as are email programs (Orifaldi 1996). The server component can also considered both hardware and software. As hardware, the server is typically a personal computer or workstation with enhanced storage capacity. Often, it resides in the same location as the business activity it is required to support. As software, servers have a variety of incarnations, depending on the operational function. For example, windows NT Server acts as a secure server, allowing users to share files and printers over a network. Web servers like Microsoft’s Information Server provides access to and delivery of information over the World Wide Web (Martin 1997). 1.6 MOST CLIENT-SERVER SYSTEMS HAVE THE FOLLOWING DISTINGUISHING CHARACTERISTICS 1. Service: client-server is primarily a relationship between processes running on separate machines. The server process is the provider of services. The client is a consumer of services. In essence, client-server provides a clean separation of function based on the idea of service. 2. Shared resources: a server can service many clients at the same time and regulate their access to shared resources. 6 3. Asymmetrical protocols: there is a one-to-one relationship between clients and servers. Clients always initiate the dialog by requesting a service. Servers are passively waiting on requests from the clients. 4. Transparency of location: the server is a process, which can reside on the same machine as the client or on different machine across the network. Client-server software usually masks the location of the server from the clients by redirecting the service calls when needed. 5. Mix and match: the ideal client-server software is independent of hardware or operating system software platform. One should be able to mix and match client and server platforms. 6. Message-based exchanges: clients and servers are loosely coupled systems which interact through message passing mechanism. The message is the delivery mechanism for the service requests and replies. 7. Encapsulation of services: the server is a specialist. A message tells a server what service is requested and it is up to the server to determine how to get the job done. Servers can be upgraded without affecting the clients as long as the published message interface is not changing. 8. Scalability: client-server systems can be scaled horizontally or vertically. Horizontal scaling