Sei sulla pagina 1di 82

For the partial fulfillment of requirements of project work of MSc 4th Computer Science 2006-2007

Submitted To: Maharishi Dayanand University , Rohtak

Submitted By:
LOVINA MSC 4TH (Comp. Science)

------------------------------------------------------BY : LOVINA

Contents
Acknowledgement Certificate Introduction to Organisation Project Overview System Study and Analysis
o o o o Introduction Existing System Drawbacks of existing system Proposed System

Feasibility Study Hardware/Software Requirements Hardware Requirements Software Requirements Softwares Used o Visual Basic o MS. Access System Design Project development o Tables Used in Project o Forms of project

------------------------------------------------------BY : LOVINA

o Coding

Testing

Acknowledgement

We Little Know What Radical Changes Are


Possible Through Blessing And Suggestion.
And I had found this golden chance to acknowledge all those people who had blesses, encouraged and supported us technically and morally through all the phases of this project. There are many people who deserve acknowledgement and gratitude for their contribution to the development and completion of this project. We reserve my heartiest gratitude towards my principal Dr. Kailash Nath Bhardwaj principal of R.K Arya College, Nawanshahar who had provided us with healthy and encouraging infrastructure in the college. Also we would like to thank Mr. Kewal Krishan H.O.D of Computer Department who had always taught us the technical skills and Never to quit motto. He had always been a source of inspiration. We would also like to thank Mr. Pushpinder Sohi who taught us MS ACCESS and Visual Basic and made our concepts crystal clear and sorted and guided us all concepts for completion of our project. We would like to thanks MR. Perdeep Kumar. His patience, determination and delightful positive spirit have been an inspiration to us. He provided too much time to prepare our project. He helped us very minutely in this project. Last but not the least our gratitude is for our parents.

------------------------------------------------------BY : LOVINA

CERTIFICATE
This is to certificate that the project in making

computerized record keepink system of AP PUBLICATION has successfully completed and implement By Parminder Kaur & Sumir Thakur students of R. K. Arya college of the Partial fulfillment of the requirement of B.Sc(IT) final in Nawan Shahar.This project has not been submitted to any other institute or university for The award of any diploma or course.

Head Of Department Project Incharge Mr. Kewal Krishan Principal K. N. Bhardwaj

Pushpinder Sohi

------------------------------------------------------BY : LOVINA

Introduction To Orgnization

M.R. AUTOS PVT. LIMITED is a registered private limited company.they are premier autos limited in area . They are authorized dealer of the HERO HONDA AUTOS LIMITED . They are selling the new Hero Honda bikes and provide service to old customers. It was established in the 1993 . by Gurmail Singh . He is the owner of the Autos limited . He is single person behind the success of the Firm . The MR auto is providing best service to their custoemer. They are aiming to maintain a standard in the field of autos Industry .

------------------------------------------------------BY : LOVINA

Introduction To Project

This Project Inventory Control of M. R. Autos LTD deals with whole process of Customer, Vehicle Model of Hero Honda, and Sparepart etc. The Aim of this project is to input the information about Customer, Model of Hero Honda, and Sparepart etc. into a computerized form, check the eligibility and correctness of the details of the form, take down these details into the database after Checking. If done in old software like FoxPro, it is quit a lengthy process as it involves the Acceptance of application forms, checking their validity, entering them in a very uncooperative environment, and evaluating them on basis of particular criterion and then finally producing a list of operators demanded a user friendly environment which provides the information about the customers, model of Hero Honda, and sparepart etc in a very short period. Bearing these problems in mind we decided to take this challenge in our hands. First of All we confirm information related to customer. We can know how many bikes are available in our stock and Sparepart in the stock. We can add information related to purchase, sale, and stock of Model And Sparepart. With this project we can make any updation related to customer, model of Hero Honda and sparepart very easily. This project is made in Microsoft Visual Basic as front-end and MS Access as database-end. Whole help about the project is written in this form. No matter if the user is new to the computers the project is very much user friendly.

------------------------------------------------------BY : LOVINA

------------------------------------------------------BY : LOVINA

PROPOSED SYSTEM STUDY


With IT revolution . industry economy is evolving and ushering into the digital economy in which information, services, products and money is transacted, transferred electronically. The computer is surely advantageous because of the high speed of operation and greater accuracy of it provides, saving affected by better managerial control and savings in labour because it is fully automatic and finally because of its flexibility in use. Today most large and medium organizations are almost totally dependent on their computers.one of them is ----BANKS. The proposed system (i.e. to computerize house loan and car loan department) aims to: Automate the numerical transactions involved in it. It is expected to reduce the clerical work load. To increase the efficiency. To calculate interest and installment automatically, in turn it will save a lot of time and will ensure greater accuracy. Most of the paper work can be reduced. To meet the maximum customer services. Maintaining history of all the transactions done by a particular customer. Maintaining records of all the customers of the bank. The proposed computerized system will provide the user instant accessibility of the cash flow sytem because the data is stored in the form of tables.the new system is VB based. Keeping tracks of so many highly detailed transactions involved in banking would be overwhelming task without the help of computers. The proposed system will overcome all the disadvantages of the present system by automating the financial transactions. Hence providing the consistent and up-to-date information about customers loan account in the bank within seconds.

------------------------------------------------------BY : LOVINA

FEASIBILITY STUDY

The objective of initial investigation is to determine whether the request is valid and feasible before a recommendation is reached to do nothing, improves, or modify the existing system, or build a new one. Depending on the results of initial investigation the survey is expanded to a more detailed feasibility study. A feasibility study is a test of a system proposal according to its workability, impact on the organization, ability to meet user needs, and effective use of resmeces. It focuses on three major questions: 1. What are the users demonstrable needs and how does a candidate system meet them? 2. What resmeces are available for given candidate

system? 3. What are the likely impacts of the candidate system on the organization? The key feasibility considerations involved in the feasibility are:

------------------------------------------------------BY : LOVINA

ECONOMIC FEASIBILITY: Economic analysis is the most frequently used method for evaluating the effectiveness of a candidate system. A procedure of cost/benefit analysis is applied to determine the savings and benefits that are expected from the candidate system and then compare them with the costs. If benefits outweigh the costs, then the decision is made to design and implement the system. Before the development of the project there Ire a lot of problems in preparing reports of the costs and calculations of the cost of various products. In hotel management system which is not automated, involves lot of paper work and manpower, which is not economical in terms of time and money. So to overcome this problem software package is required which will automate the above stated tasks. It is found that implementation of software package is economically feasible than the existing system because it reduces time, manpower and money.

------------------------------------------------------BY : LOVINA

TECHNICAL FEASIBILITY: As I have seen that me project is economically feasible and the management can afford the new computers, hence all I need is to install new systems and install visual basic and oracle. After this I can run me software on the computers. SOCIAL FEASIBILITY: It is important to study that the social implications when a new system is introduced. People are inherently resistant to change and computers have been known to facilitate change. An estimate was made of how strong reaction user staffs is likely to have towards the development of a computerized system. It is undesirable that introduction of the candidate system requires special effect to educate; sell and train the staff on new ways of providing help and best treatment to needy masses. But in me case most of the staff is not habitual, using the computer system still they gave a good response and after a small period of training they would be able to efficiently use the system because much stress would laid on the user friendliness of the system. SCHEDULE FESIBILITY:

------------------------------------------------------BY : LOVINA

Given me technical expertise, is the project deadline reasonable? Some projects are initiated with specific deadline you need to determine whether the deadline are mandatory or desirable. It is preferable to deliver a properly functioning system two months later than to deliver an error prone useless system on time. Inadequate system is worse. Its a choice between the lesser of to evils. So keeping in view the above statement I decided to keep me deadline mandatory. I extended me deadline to give an error free software package.

MOTIVATIONAL FEASIBILITY: To achieve the desired objective it is necessary to motivate the developer group. Motivational feasibility means to coach and direct individual to overcome difference and achieve project goals as a team.

------------------------------------------------------BY : LOVINA

------------------------------------------------------BY : LOVINA

Hardware software requirements


MINIMUM

H /S REQUIREMENTS ARE FOLLOWING../.

At least 386(80386) Mhz or equivalent processor 4 MB RAM 40 MB HDD 1.44 MB FLOPPY DISK DRIVE Super VGA (Single or Multicolor) Monitor 101 Key Standard Keyboard Mouse CD-Rom Drive With CD Driver Dot Matrix / Inkjet Printer

FOR BEST PERFORMANCE:-- Pentium_IV (733 Mhz) or Higher Processor 128 MB RAM 10 GB HDD 1.44 Floppy Disk Drive 15 SVGA Color Monitor 101 Key Standard Keyboard Scroll Mouse Inkjet / Laser Printer

SOFTWARE REQUIREMENT:-- Microsoft Windows 98 or Latest CD-ROM Drive with CD Driver 12 MB of Memory for installation Printer

------------------------------------------------------BY : LOVINA

Existing System
Following are main failures of existing system Currently the whole system is manual and it involves the human work. So there are large number of mistakes because of human work. Entries might have errors. So the system should be able to check for error before they are entered in the database. Format for each customer or books entry input should be similar to the one currently being used. Current system is complex because large number of files have to be managed. It is also very time consuming to search for a record in these large files like finding the request of parucular person is too difficult. There is a lake of systematic way to keep database and programs together , data is scattered in various files and files have different formats. No centralized way for accesing data at various locations. Concurrent access and integrity problems are there in the system. No security of datbase or program, any one can access files maintained at the company and make changes to it. Data redundancy and inconsistency problem, same informations present at different files have to be updated whenever any change accur. The output of this phase is a document specifying various problem of the company related to identifying requests and supplied books of different customers.

------------------------------------------------------BY : LOVINA

VISUAL BASIC AS A FRONT END


Front end means the interface provided to user of the software .all the visual effects of projects software suite are designed using programming tool should have features to add all type of elements on the various screens of project. visual basic is the best choice to use it as a front end tool for developing software which use database as a back end tool. visual basic is first choice for programmers for developing software because visual basic is very easy to use, fast to design and very effective, visual basic has an integrated development environmental types of programs are designed in this environment very easily. in vb programs can design screen elements some mouse clicks and dragging . programmer has to write less cods for activating these elements . in contrary to other programming language like c ++ , where programmer has to write hundred lines of cods to show only just two text boxes for data entry from user at run time . but in visual basic it is very easy task . programmer need not write any code to show text boxes on form . user has to click on toolbar and draw two text boxes on screen of any size . vb has a set of standard tools in a toolbox we can design almost any type of screen item .with these tools . vb has various tools for database connectivity . programmer can use any of these tools according to his needs . for example we can use data control , data access object , adodc , rdo , adodb etc . tools for database connectivity .

------------------------------------------------------BY : LOVINA

Front end means the interface provided to user of the software .all the visual effects of projects software suite are designed using programming tool should have features to add all type of elements on the various screens of project. visual basic is the best choice to use it as a front end tool for developing software which use database as a back end tool. visual basic is first choice for programmers for developing software because visual basic is very easy to use, fast to design and very effective, visual basic has an integrated development environmental types of programs are designed in this environment very easily. in vb programs can design screen elements some mouse clicks and dragging . programmer has to write less cods for activating these elements . in contrary to other programming language like c ++ , where programmer has to write hundred lines of cods to show only just two text boxes for data entry from user at run time . but in visual basic it is very easy task . programmer need not write any code to show text boxes on form . user has to click on toolbar and draw two text boxes on screen of any size . vb has a set of standard tools in a toolbox we can design almost any type of screen item .with these tools . vb has various tools for database connectivity . programmer can use any of these tools according to his needs . for example we can use data control , data access object , adodc , rdo , adodb etc . tools for database connectivity .

INTRODUCTION TO VISUAL BASIC


VISUAL BASIC is the fastest and most builds applications. One of the most truly beautiful things about Visual Basic is that it supports a gentle incremental development paradigm. Visual Basic is enjoying unprecedented success. Over the last several years millions of applications have been written is Visual Basic. Visual Basic continues to grow in richness and depth faster than the windows operating family. Visual Basic is primarily a visual design environment. Your chances of success with Visual Basic are much higher simply because the Visual Basic environment makes it easy to perform the basic tasks necessary to create windows applications. The best news is that Visual Basic is a pure windows development

------------------------------------------------------BY : LOVINA

tool. Visual Basic applications are ENENTDRIVEN. Event driven means the user is in control of the applications. Your Visual Basic applications respond to those events through the code you have written and attached to those events. Visual Basic supports the principles of object-oriented design. This means that you can compartmentalize different aspects of your applications as objects developed and test those objects independently of the rest of the application. MICROSOFT has designed Visual Basic to be a complete windows application development system. Visual Basic infinitely extensible through the use of Active-X controls, dynamic linked libraries. Visual Basic provides a graphical look. The quickest way to learn Visual Basic is to build programs.

Visual Basic 6.0 Versus Other Versions Of Visual Basic The Original Basic for Dos and Visual Basic for windows were introduced in 1991. Visual Basic 3.0(a vast improvement over previous versions) was released in 1993. Visual Basic 4.0 released in late 1996. New environment, supported creation of ActiveX controls, deleted 16-bit application support. And, now Visual Basic 6.0-some identified new features of visual basic 6.0: Faster compiler New ActiveX data control object. Allows database integration with wide variety of applications. New data report designer. New package & deployment wizard. Additional internet capabilities.

Structure of a VISUAL BASIC Application FORMS-Windows that one create for user interfaces. Controls-Graphical features drawn on forms to allow user interaction (text boxes, labels, scroll bars, command buttons, etc.)(Forms and Controls are OBJECTS.) Properties-Every characteristics of a form or control is specified by a property. Example properties include names, caption, size, color,

------------------------------------------------------BY : LOVINA

position, and contents. Visual Basic applies default properties. One can change properties at design time or run time. Methods-Built-in procedure that can be invoked to impart some action to a particular object. Events proceduresCodes relate to some object. This is the code that is executed when a certain event occurs. Gereral procedures Code not related to objects. This code must be invoked by the application. Modules Collection of general procedures, variable declarations, and constant definitions used by application.

Steps in Developing Application


There are three primary steps involved in building a Visual Basic application. Draw the user interface Assign properties to controls. Attach code to controls. Drawing The User Interface And Setting Properties Visual basic operates in three modes. Design mode-used to build application. Run mode-used to run the application. Break mode-application halted and debugger is available.

SIX WINDOWS APPEAR WHEN WE START VISUAL BASIC The MAIN WINDOW consists of the title bar, menu bar, and toolbar. The title bar indicates the project name, the current Visual Basic operating mode, and the current form. The menu bar has drop-down menus from which one can control the operations of the Visual Basic environment. The tool bar has buttons that provides shortcuts to some of the menu options. The main window also shows the location of the current form relative to the upper left corner of the screen and the width and length of the current form.

------------------------------------------------------BY : LOVINA

The FORM WINDOW is central to developing Visual Basic applications. It is where you draw you draw your application. The TOOLBOX is the selection menu for controls used in your application. The PROPERTIES WINDOW is used to establish initial property values for objects. The drop-down box at the top of window lists all objects in the current form. Two views are available: Alphabetic and cauterized. Under this box are the available. Under this box are the available properties for currently selected object The FORM LAYOUT WINDOW shows where (upon program execution) your form will be displayed relative to your monitors screen. THE PROJECT WINDOW displays a list of all forms and modules making up your application. You can also obtain a view of the FORM or CODE windows (window containing the actual basic coding) from the Project Window.

Setting properties of objects and design time: Each form and control has properties assigned to it by default when one start up a new project. There are two ways to display the properties of an object. The first way is to click on the object in the form window. Then, click on the properties window or the properties window button in the toolbar. The second way is to first click on the properties window. Then, select the object from the object box in the properties window The drop-down box at the top of the properties window is the object box. It displays the name of each object in the application as well as its type. This display shows the form object. The properties list is directly below this box. In this list, we can scroll through the list of properties for the selected object. We may select a property by clicking on it. Properties can be changed by typing a new value or choosing from a list of predefined settings (available as a drop down list). Properties can be viewed in two ways: alphabetic and categorized. A Very important property for each object is its name. The name is used by Visual Basic to refer to a particular object in code.

------------------------------------------------------BY : LOVINA

SETTING PROPERTIES AT RUN TIME: We can also set or modify properties while our application is running. To do this, we must write some code. The code format is: Object Name. Property=New Value Such a format is referred to as dot notation. For example, to change the Backcolour property of a form name frmstart, wed type: FrmStart. Backcolour=Blue

Visual basic forms Visual Basic has several different types of objects. The form is one of the most basic objects in which the application is developed. A form is a window that contains application code and has other objects placed on it to create the user interface. A form may fill the entire screen or have other forms contained within it, or it may be a custom dialog box. Visual Basic initially includes the default form, form1 file in each new project. You can change the forms name and caption to identify the purpose of the form. Every form object has its own properties, events and methods associated with it. A form is a display area that corresponds to a window or dialog box that makes up the part of an applications user interface. Each form has property associated with it. In Visual Basic there are two types of forms namely Normal Form and a Multi Document Interface (MDI) Form. A forms collection is a collection of all the loaded forms in an application. All the forms me add to an application are automatically added to a form collection.

------------------------------------------------------BY : LOVINA

The .EXE file can be made by combination of forms (.FRM), modules (.BAS), and controls (.OCX) Variables, data types and modules Visual Basic used building blocks such as Variables, Data types, Functions, and control structures in its programming of Visual Basic.

Modules Code in Visual Basic is stored in the form of Modules. The three kinds of modules are Form modules, Standard modules and Class modules. A simple application may contain a single form, and the code resides in that form module itself. As the application grows, additional forms are added and there may be a common code to be executed in several forms. To avoid there duplication of codes, a separate module containing a procedure is created that implements the common code. This is a Standard Module. Class module (.CLS) is the foundation of object oriented

programming in Visual Basic. New objects can be created by writing code in class modules. Each module can contain: Declaration: May include constant, type, variable and DLL

procedure Declaration.

------------------------------------------------------BY : LOVINA

Procedures:

A sub function, or property procedure that contain

pieces of code that can be executed as a unit. Data types By default Visual Basic variables are of variant data type. The variant data type can store numeric, date/time or string data. When the variable is declared, a data type is supplied for it that determines the kind of data they can store.

The fundamental data in Visual Basic including variant are integer, long, single, double, string, currency, byte and Boolean. Visual Basic supports a vast array of data types. Each data type has the limit to the kind of information and the maximum and the minimum value it can hold. In addition, some types can interchange with the other type of data types. A table of Visual Basics simple data types is given below. Variables Variables are used for storing values temporarily. A defined naming strategy has to be followed while naming a variable. A variable name must begin with an alphabet letter and should not exceed 255 characters. It must be unique within the same scope. It should not contain any special character like %, &, #, @ or $. There are many ways of declaring variables in Visual Basic. Depending on where the variables are declared and how they are declared, I can determine how the can be used by me application. The different ways of declaring variables in Visual Basic are listed below:

------------------------------------------------------BY : LOVINA

1. Explicit Declaration 2. Using Option Explicit Statement

Assigning values to variables After declaring various variables using the Dim statements, I can assign values to those variables. The general format of assignment is Variable = Expression The variable can be a declared variable or a control property value. The expression could be a mathematical, expression, a number, a string, a Boolean value etc. Operators in Visual Basic In order to compute inputs from users and to generate results, I need to use various mathematical operators.

In Visual Basic, except for + and -, the symbols for the operators are different from normal mathematical operators, as shown in Table below: Operator Mathematical function ^ * / Exponential Multiplication Division Example 2^4=16 4*3=12 12/4=3

------------------------------------------------------BY : LOVINA

Mod

Modulus(return the Remainder from an Integer division)

15 Mod 4=3

Integer Division (discards the decimal places)

19\4=4

+ Or &

String concatenation

Visual & Basic = Visual Basic

Conditional operators To control the Visual Basic program flow, I can use various conditional operators. Basically, they resemble mathematical operators. Conditional operators are very powerful tools, they let the Visual Basic program compare data values and then decide what action to take, whether to execute a program or terminate the program and etc. These operators are shown in Table below: Operator = > < >= <= Logical operators In addition to conditional operators, there are a few logical operators, which offer added power to the Visual Basic programs. These are shown in table below: Meaning Equal to More then Less then More then Equal to Less then Equal to

------------------------------------------------------BY : LOVINA

Operator AND OR XOR NOT

Meaning Both sides must be true One side or other must be true One side or other must be true but not both Negates truth

Control structures Control structures are used to control the flow of programs execution. Visual Basic supports control structure such as ifthen, ifthenelse, selectcase, and Loop Structures such as Do While Loop, Do Loop, While Loop and For Next Loop method. USING IFTHEN ELSE STATEMENTS WITH OPERATORS To effectively control the Visual Basic program flow, I shall use If ThenElse statement together with the conditional operators and logical operators. The general format for the ifThenElse statement is

If condition Then VB expression Else VB expression End If

Select case statement

------------------------------------------------------BY : LOVINA

If you have a lot of conditional statements, using IfThenElse could be very messy. For multiple conditional statements, it is better to use Select Case. The format is:

Select Case expression Case value1 Block of one or more statements Case value2 Block of one or more statements Case value3 Block of one or more statements Case value4 . . Case Else Block of one or more statements End Select Procedures Visual Basic offers different type of procedures to execute small section of coding in applications. The various procedures are elucidated in detail in this section. The section also goes about explaining the various control structures available in the Visual Basic. Visual Basic programs can be broken into small logical components called Procedures. Procedures are useful for condensing repeated operations such as the frequently used calculations, text and control

------------------------------------------------------BY : LOVINA

manipulation etc. the benefit of using procedures in programming are: . It is either to debug a program with procedures, which breaks a program into discrete logical limits. . Procedures used in one program can act as building blocks for other programs with slight modifications. Arrays in Visual Basic By definition, an array is a list of variables, all with the same data type and name. When I work with a single item, I only need to use one variable.

However, if I have a list of items, which are of similar type to deal with, I need to declare an array of variables instead of using a variable of each item. For example, if I need to enter one hundred names then instead of declaring one hundred different variables, I need to declare only one array. I differentiate each item in the array by using subscript, the index value of each item, for example name (1), name (2), name (3) .etc.

Declaring Arrays I could use Public or Dim statement to declare an array just as the way I declare a single variable. The Public statement declares an array that can be used throughout an application while Dim

------------------------------------------------------BY : LOVINA

statement declares an array that could be used only in a local procedure. The general format to declare an array is as follow: Dim array name (subs) as data type Where subs indicates the last subscript in the array. Event driven programming An event is an action performed by the user that starts an event handler. An event handler is a block of code that is executed automatically when the user performs an action or event. Event driven programming is defined as a technique where the operation being performed by the application depends upon the user action. The user interface itself does nothing except tell the computer program what to do when one clicks the button with the printer icon on it, it sends the message to the word processor telling that the print button was clicked. The word processor package reacts by printing out the document. In the same way, when you write the Visual Basic programs, you must tell what will happen when the user clicks your button, or types some text into the text box. This kind of programming where the code is executed in reaction to user action is termed as an Event Driven Programming.

------------------------------------------------------BY : LOVINA

An Event is when the user performs an action on the computer like clicking a button or selecting the menu item. There is numerous numbers of events. An Event Handler is a set of instruction that is triggered in response to an event.

Client-server concept A Visual Basic is a client-server programming and in the clientserver architecture, a client request services from the server. The client is a computer or an application with which the user interacts. A server machine is a computer or an application that search client machine by catering to their request. As ever a machine has resmeces , it can share with other computer or a service it can perform on the behalf of the other computer. Client-Server application is one such example. They run on both, a client and a server and they meld the best part of stand-alone and a mainframe technology into cohesive environment. The data id fed and processed on the front end (client) but stored and served by the powerful backend (server). The server manages the database along with the number of clients. For example, VB power builders are powerful front-end tools. Visual Basic connects to a number of backend DBMS(data base management system) such as SQL server, Access etc. any back-end DBMS whose DBM core obeys open database connectivity (ODBC) rules can also be connected. Introduction to Visual Basic functions Functions are similar to normal procedures but the main purpose of the functions is to accept certain input and pass them on to the

------------------------------------------------------BY : LOVINA

main program to finish the execution. They are two types of functions, the built-in functions (or internal functions) and the functions created by the programmers. The general format of a function is: Function name (arguments) Where arguments are values that are passed on to the functions. There are two very basic but useful internal functions, i.e. the MsgBox( )and InputBox( ) functions.

Msgbox () Function The objective of MsgBox is to produce a pop-up message box and prompt the user to click on a command button before he/she can continue. This message box format is as follows: Variable Name=MsgBox (Prompt, Style, Value, Title) The first argument, Prompt, will display the message in the message box. The Style value will determine what type of command buttons appear on the message box, as given in the table. The Title argument will display the title of the message border. Style Value Displayed 0 1 buttons vbOkOnly vbOkCancel Ok button Ok and Cancel Named Constant Buttons

------------------------------------------------------BY : LOVINA

2 Ignore

vbAbortRetryIgnore

Abort, Buttons

Retry

and

3 4 5

vbYesNoCancel vbYesNo vbRetryCancel

Yes, No and Cancel buttons Yes and No buttons Retry and Cancel buttons

I can use named constant in place of integers for the second argument to make the programs more readable. Intact, VB6 will automatically shows up a list of names constant where you can select one of them. Variable Name = MsgBox(Click OK to Proceed, vbOkCancel, Startup Menu) OR Variable Name = MsgBox(Click OK to Proceed, 1, Startup Menu) are the same. Variable Name that holds values that are return by the MsgBox () function. The values are determined by the type of buttons being clicked by the users. It has to be declared as Integer data type in the procedure or in the general declaration section.

Return values and Command Buttons Value Clicked 1 2 vbOk vbCancel Ok Button Cancel Button Named Constant Button

------------------------------------------------------BY : LOVINA

3 4 5 6

vbAbort vbRetry vbIgnore vbYes

Abort Button Retry Button Ignore Button Yes Button

The Input box () Function An Inputbox () function will display a message box where the user can enter a value or a message in the form of text. The format is: VariableName = Input Box (Prompt, Title, Default_text, xposition, y-position) VariableName is a variant data type but typically it is declared as a string which accepts the message input by the users. The arguments are explained as follows: Prompt: - The message displayed normally as a question asked. Title : - The title of the Input Box. Default_text :-The default text that appears in the input field where user can use it as his intended input or he may change to the message he wish to key in. x-position and y-position :- The position or the coordinate of the Input Box.

------------------------------------------------------BY : LOVINA

INTRODUCATION TO MICROSOFT ACCESS


MICROSOFT ACCESS is a collection of information of any relational database

management system (RDBMS). Use to store and manipulate large kind. Here RDBMS refers to the organization of data in a series of row and columns in such a manner that any specific piece of information is available with the click of mouse and a few key strokes . MS access has tools which are easy to use and provide development professionals . for example access can be used to enter and maintain students awards , inventory records , telephones nos. once the record are stored , any type of queries can be asked Reports can be created and data entry forms can be designed . At an advanced level Access can be used for developing custom applications by employees and a distribution kit for compiling Applications

Components of MS . Access
Database Window
Here all objects of a database are stored in single file having extension MDB. The objects are managed trough the database window. It show s all the database objects of the access Database file . For example all the Tables, Queries, forms, Reports and Macros are listed in the database window . we can create new database objects from database window . for Example we can create a new table using one of the three available methods ( 1 Create table in Design View ,ii Create table using Wizard ,iii Create table by directly entering data into the Table).

------------------------------------------------------BY : LOVINA

Tables
Table is the basic object in Access . all the data in the access is stored in tables . We can create other objects of the Database file after creating a table . A table is a Matrix of rows and columns . one row is called one record and Columns are also called Fields . Data is entered in the cells .each tables stores information about one entity such as students , customer product , patient each row in the table eeriest a single record Of an entity . each column contain a discrete element of information , called a filed might be a student name , use number , unit n, or telephone number . to illustrate the concept Of a table , record and filed , student database I used which uses different to store , Roll number , name father name and class of student (student table ) Fee information (fees table ) Gradation information (grades table ) The fist table (student table ) stores roll number , name father name data of class and session of student Student table FIELD PLOT NO DATATYPE NUMBER NUMBER NUMBER VARCHAR2 VARCHAR2 VARCHAR2 NUMBER NUMBER SIZE 10 10 10 50 50 50 10 10 ATTRIBUTE PRIMARY KEY

Sector Size
NAME FATHERS NAME ADDRESS TELE.NO LETTER NO

------------------------------------------------------BY : LOVINA

The first row in the table shows the name of different filed . the next four rows shows for different record having different values for different failed

Forms ;

forms display the data from a table or query in the

firmed request by user . the records or fields in the table are placed in the forms can be edited according to the requirement . fort example , user can create a from having roll no name and class of a student ignoring the other fields in the student table . Queries: a queries is a question asked by the user to extract

information according to his / her requirement . for a query can be created that asks for the list of students we have secured more then 70%or asks for the list of student detail of Indian resident in u.s.a . the result of a query is displaced in the forms of data sheet . a query is thus a set of information that changes with the contents of the supporting table . Reports: a reports displayed the in a prescribed format . access produce the reports by incorporating graphs , chats and different styles . it can be used to group data show subtotal and gland totals . access enables according to need. Macros : a macros are used to automate used tasks access macros execute number of actions such as opening file , displaying message boxes , validating of data . Start access : to start access , double click on the ms access icon found in the Microsoft office . after this stating screen of ms Access appears on computer screen . c

------------------------------------------------------BY : LOVINA

Creating table ; 1 choose new database from the file menu in the acc opening screen . a window is the access displayed which asks for the name of the new database and the location where a file is to be stored . e .g, here a database created to stored student details 2 type file name as student .mdb 3 click the database . 4 now the window will be displayed on screen known as database window the windows provides access to create tables , queries forms , reports, macros and modulus . creating a table : 1 the next step is to created a the table that will store the data . to create a table , click on the table button in the data base windows . then click on the new button . a new table dialog box will appear displayed option of data sheet view design view table wizard as well as import and link . The first option datasheet view is used to view the data stored in table to build up a table from a scratch, click on design view option and click ok. To design a new table the structure for a table has to be defined to create it. The structure consists of a fields and records. Type the field name, data types and description. A field name can have maximum 64 character and have any character number and spaces except for the period(.) square brackets[ ] and exclamation marks(!)

------------------------------------------------------BY : LOVINA

Back End Used


what is Database? A database can be defined in many ways. It is an organized collection of data or the organized collection of facts and figures stored in a particular. Format. It is an integrated set of interrelated data. It is a repository of relevant information and so no. A database is an organized collection of information. It is a tool for organizing, sorting, maintaining, calculating, combining, and retrieving information. Thus you can use an ORACLE database for organizing: Mailing Lists. Customer, Client, and Supplier Lists. Personal Information. Inventories. Accounts. Payables and Receivables. A variety of other information. Database System A Database System is an integrated collection of related files, along with details of the interpretation of the data contained therein. I can explain a database system as a

------------------------------------------------------BY : LOVINA

system which manages the database and which facilitates us to update or manipulate the data. Need for a Database System The Database System is needed to eliminate the disadvantages of traditional paper-based method of record keeping. The various advantages are:
Compactness: There is no need for possibly voluminous

paper files.
Speed: The machine can retrieve and update data far

faster than a human can. In particular, queries can be ansIred quickly without any need for time consuming manual searches.
Less drudgery: Much of the sheer tedium of maintaining

files by hand is eliminated. Mechanical tasks are always better done by machines.

Currency: Accurate, up-to-date information is available on demand at any time.

Database System Applications Databases are widely used. Here are some representative applications: Banking: For customer information, accounts and loans and banking transactions. Airlines: For reservations and schedule. Airlines Ire among the first to use databases in a geographically

------------------------------------------------------BY : LOVINA

distributed manner terminals situated around the world accessed the central database systems through phone lines and other data networks. Universities: For student information , cmese registrations and grades. Credit card transactions: For purchases on credit cards and generation of monthly statements. Telecommunication: For keeping records of calls made ,generating monthly bills, maintaining balances on prepaid calling cards and storing information about the communication networks. Finance: For storing information about holdings, sales & purchases of financial instruments such as stocks & bonds. Database Management System (DBMS) A Database Management System (DBMS) is a software system that allows access to data contained in a Database. To allow users to manipulate the information, the system has a number of application programs that manipulate the files, including: A program to debit or credit an account. A program to add a new account. A program to find the balance of an account. A program to generate monthly statements. It exerts centralized control of the database and this system automatically manages the data stored in the databases .

------------------------------------------------------BY : LOVINA

Conceptually, what happens is:


A user issues an access request, using some particular

data sub language (typically SQL).


The DBMS intercepts that request and analyzes it. The DBMS inspects, in turn, the external schema for that

user, the corresponding external/conceptual mapping, the conceptual schema, the conceptual/internal mapping, and the storage structure definition.
The DBMS executes the necessary operations on the

stored database. Objective of DBMS The objective of DBMS is to provide a convenient and effective method of defining, storing, and retrieving the information contained in the database. Also it ensures the privacy of data and prevents unauthorized access to the database. Characteristics of a DBMS It represents complex relationships betIen data. Keeps a tight control of data redundancy. Enforces user-defined rules to ensure the integrity of table data.

------------------------------------------------------BY : LOVINA

Has a centralized data dictionary for the storage of information pertaining to data and its manipulation. Ensures that data can be shared across applications. Enforces data access authorization. Have automatic, intelligent backup and recovery procedures for data. Have different interfaces via which users can manipulate data.

------------------------------------------------------BY : LOVINA

sBJECTIVES OF NEW SYSTEM

The proposed system i.e. to computerize house loan and car loan department aims to: Automate the numerical transactions involved in it. It is expected to reduce the clerical workload. To increase the efficiency. To calculate interest and installment automatically, in turn it will save a lot of time and will ensure greater accuracy. Most of the paper work can be reduced. To meet the maximum customer services. Maintaining history of all the transactions done by a particular customer. Maintaining records of all the customers of the bank. The proposed computerized system will provide the user instant accessibility of the cash flow system because the data is stored in the form of tables. The new system is VB based. Keeping tracks of so many highly detailed transactions involved in banking would be overwhelming task without the help of computers. The proposed system will overcome all the disadvantages of the present system by automating the financial transactions. Hence providing the consistent and up-to-date information about customers loan account in the bank within seconds.

------------------------------------------------------BY : LOVINA

Data Flow Diagram Vehicles


VehicleStock Table Add New Model Process 1

Sale Vehicles Table

Purchase Vehicle Process 2 form

Sales Vehicle Table

Sales of Vehicle Form

Customers table

Add New Customer Form

Spareparts Data Flow Spare parts Stock Table

Add New SparePArts Process 1 form

Purchasae SparePArts Table Pruchase Spare Part Process 2 Sale SparePArts table Sale Spare Parts form

------------------------------------------------------BY : LOVINA

TABLES USED IN PROJECT

------------------------------------------------------BY : LOVINA

Customer Table : This table is used to keep record of all teh customer of the company. It keeps record of Name, custId,Addreess, balance , PhoneNo , Last_updateDate .

Purchase Vehicle Table :


This table is used to keep the record of Bike purchases.

Models Table :
------------------------------------------------------BY : LOVINA

This table is used to keep the record of models.In this

Supplier Table :
This table is used to keep the record of Suppliers.This table has the column Supplier Name,Contact name,Contact Title,Address,City etc.

------------------------------------------------------BY : LOVINA

SPAREPARTS

Stock Table

This table is used to keep record of all the stock of Spareparts .

Sale Vehicle Table :This table is used to keep the record of bike sales.

------------------------------------------------------BY : LOVINA

------------------------------------------------------BY : LOVINA

FORM AND REPORTS

------------------------------------------------------BY : LOVINA

LOGIN FORM

This is Login form . User have to enter UserName And Password in this form to enter into application .

------------------------------------------------------BY : LOVINA

ADD SPAREPART PURCHASE FORM

This is Add Sparepart Purchase Record form. This form is used to add new purchase of spareparts . user has to enter Purchase Order_no and other details of Sparepart Purchased . User Can Select any Part from Combobox . The Right Side Grid Displays the List of SpareParts and Their Product_Ids.

------------------------------------------------------BY : LOVINA

PURCHASE VEHICAL FORM

This is Add-Purchase Vehical form. This form is used to add new purchase of vahicals . User has to add ORDER ID and other details of vahical. User can select any vahical model from COMBO BOX.

------------------------------------------------------BY : LOVINA

ADD NEW CUSTOMER RECORD FORM

This form is used to add new customer. User can add customer details and customer ID . This form also show balance due to any customer . It also shows last date of updation.

------------------------------------------------------BY : LOVINA

ADD SPAREPART SALE RECORD FORM

This form is used to add record for the sale of spareparts. User can enter the INVOICE NUMBER and can select the customer ID from COMBO BOX and form itself display the name of customer according to ID of customer .User can select part ID and part name will be displayed automatically.Also when we add quantity And unit price then total price will automatically be calculated.

------------------------------------------------------BY : LOVINA

VEHICLE STOCK FORM

This form is used to show stock of vehicals . When user select vehical model from COMBOBOX then details of selected model of vehical will be shown in grid on the form .

------------------------------------------------------BY : LOVINA

FORM TO SHOW CUSTOMER RECORD

This form is used to show details of customers in grid like ID , NAME , ADDRERSS , PHONE NUMBER etc.

------------------------------------------------------BY : LOVINA

SHOW SPARE PART STOCK RECORD FORM

This form is used to show details of current stock of sparepart like product ID , NAME , UNIT PRICE and QUANTITY.

------------------------------------------------------BY : LOVINA

MAIN WINDOW

This is the main window of the project. Through this form user can navigate to all forms available in this project .

------------------------------------------------------BY : LOVINA

ADD NEW VEHICLE MODEL FORM

This form is used to add new vehical model and its discription and modify old records of vehicals.

------------------------------------------------------BY : LOVINA

MODIFY CUSTOMER RECORD FORM

This form is used to modify records of customers . User can add customer ID in TEXTBOX shown at right side of form and customer details will automatically displayed.

------------------------------------------------------BY : LOVINA

REPORT OF SPAREPARTS PURCHASE REPORT

------------------------------------------------------BY : LOVINA

SPAREPARTS SALE REPORT

------------------------------------------------------BY : LOVINA

SPARE PARTS STOCK REPORT

------------------------------------------------------BY : LOVINA

BIKES SALE REPORT

------------------------------------------------------BY : LOVINA

CODING

------------------------------------------------------BY : LOVINA

CODING OF ADD MODEL FORM


Dim conn As New ADODB.Connection Dim RSP As New ADODB.Recordset Dim N As Integer Private Sub cmd_add_Click() Txt_model.Text = "" txt_date.Text = " " Txt_price.Text = " " txt_des.Text = " " Txt_model.Locked = False txt_date.Locked = False Txt_price.Locked = False txt_des.Locked = False Cmd_Add.Enabled = False cmd_delete.Enabled = False cmd_modify.Enabled = False cmd_save.Enabled = True Cmd_Cancel.Enabled = False cmd_next.Enabled = False cmd_previous.Enabled = False Txt_model.SetFocus End Sub Private Sub cmd_Cancel_Click() Txt_model.Locked = True txt_date.Locked = True Txt_price.Locked = True txt_des.Locked = True cmd_update.Visible = False Cmd_Cancel.Visible = False cmd_modify.Visible = True cmd_delete.Visible = True Cmd_Add.Visible = True cmd_save.Visible = True End Sub Private Sub cmd_delete_Click() s = MsgBox("ARE YOU SURE TO DELETE THE RECORD", vbInformation + vbYesNo) If s = YES Then RSP.Delete MsgBox "YOUR RECORD IS DELETED", vbInformation + vbOKOnly Else MsgBox "YOUR RECORD IS NOT DELETED", vbInformation + vbOKOnly End If End Sub Private Sub cmd_ext_Click() Unload Me End Sub Private Sub cmd_Modify_Click() Txt_model.Locked = False txt_date.Locked = False

------------------------------------------------------BY : LOVINA

Txt_price.Locked = False txt_des.Locked = False Txt_model.SetFocus cmd_update.Visible = True Cmd_Cancel.Visible = True cmd_modify.Visible = False cmd_delete.Visible = False Cmd_Add.Visible = False cmd_save.Visible = False End Sub Private Sub CMD_NEXT_Click() RSP.MoveNext If RSP.EOF = True Then MsgBox "YOU ARE ON LAST RECORD", vbInformation + vbOKOnly RSP.MoveLast End If display End Sub Private Sub CMD_PREVIOUS_Click() RSP.MovePrevious If RSP.BOF = True Then MsgBox "YOU ARE ON FIRST RECORD", vbInformation + vbOKOnly RSP.MoveFirst End If display End Sub Private Sub cmd_save_Click() RSP.AddNew RSP!model_name = Txt_model RSP!date_launch = txt_date RSP!price = Txt_price RSP!Description = txt_des RSP.Update MsgBox "RECORD SAVED .. ", vbInformation + vbOKOnly Txt_model.Text = " " txt_date.Text = " " Txt_price.Text = " " txt_des.Text = " " Txt_model.Locked = True txt_date.Locked = True Txt_price.Locked = True txt_des.Locked = True End Sub Private Sub display() Txt_model.Text = RSP!model_name txt_date.Text = RSP!date_launch Txt_price.Text = RSP!price txt_des.Text = RSP!Description End Sub Private Sub cmd_update_Click() r = MsgBox("ARE YOU SURE TO UPDATE RECORD", vbInformation + vbYesNo) If s = vbYes Then RSP.Update

------------------------------------------------------BY : LOVINA

MsgBox "YOUR RECORD IS UPDATED", vbInformation + vbOKOnly Else MsgBox "YOUR RECORD IS NOT UPDATED", vbInformation + vbOKOnly End If Txt_model.Locked = True txt_date.Locked = True Txt_price.Locked = True txt_des.Locked = True cmd_update.Visible = False Cmd_Cancel.Visible = False cmd_modify.Visible = True cmd_delete.Visible = True Cmd_Add.Visible = True cmd_save.Visible = True End Sub Private Sub Form_Initialize() N = 1 On Error GoTo erp conn.Open "inventory_ks" RSP.Open "select * from Models", conn, adOpenKeyset, adLockPessimistic display Image1.Picture = LoadPicture(App.Path & "\bikes\GLMOUR.JPG") Exit Sub erp: MsgBox "unable to open database....", vbInformation End Sub Private Sub Timer1_Timer() If N = 1 Then Image1.Picture = LoadPicture(App.Path & "\bikes\GLMOUR.JPG") N = 2 Else N = 1 Image1.Picture = LoadPicture(App.Path & "\bikes\PASSION.JPG") End If End Sub

------------------------------------------------------BY : LOVINA

CODING OF ADD CUSTOMER FORM


Dim db As New ADODB.Connection Dim rs_cust_id As New ADODB.Recordset Dim rs As New ADODB.Recordset Private Sub cmd_add_Click() rs.AddNew rs!customer_id = txt_id rs!CUSTOMER_NAME = txt_name rs!cust_address = txt_add rs!phone_no = txt_phn rs!mobile_no = txt_mbl rs!bal_due = txt_balance rs!last_updated = DTP_update.Value rs.Update MsgBox "RECORD SAVED .. ", vbInformation + vbOKOnly txt_id.Text = " " txt_name.Text = " " txt_add.Text = " " txt_phn.Text = " " txt_mbl.Text = " " txt_balance.Text = 0 rs_cust_id.Open "select * from CUST_RECORD", db, adOpenKeyset, adLockPessimistic rs_cust_id.MoveLast txt_id.Text = rs_cust_id!customer_id + 1 rs_cust_id.Close End Sub Private Sub cmd_Cancel_Click() NM = MsgBox("ARE U SURE TO CANCEL ADD RECORD ? ", vbYesNo + vbCritical) If NM = vbYes Then txt_id.Text = " " txt_name.Text = " " txt_add.Text = " " txt_phn.Text = " " txt_mbl.Text = " " txt_balance.Text = 0 Else End If End Sub Private Sub cmd_ext_Click() Unload Me End Sub Private Sub Form_Initialize() Dim st As Integer On Error GoTo erp db.Open "inventory_ks" rs.Open "select * from CUST_RECORD", db, adOpenKeyset, adLockPessimistic txt_balance.Text = 0 Exit Sub erp: MsgBox "Error .. unable to open Database"

------------------------------------------------------BY : LOVINA

End Sub Private Sub Form_Load() rs_cust_id.Open "select * from CUST_RECORD", db, adOpenKeyset, adLockPessimistic rs_cust_id.MoveLast txt_id.Text = rs_cust_id!customer_id + 1 rs_cust_id.Close End Sub --------------

------------------------------------------------------BY : LOVINA

CODING OF SALE VEHICLE FORM


Dim db As New ADODB.Connection Dim RS1 As New ADODB.Recordset Dim rs As New ADODB.Recordset Private Sub cmd_add_Click() rs.AddNew rs!SALE_DATE = DTP_DATE.Value rs!INVOICE_NO = txt_invoice rs!CUSTOMER_NAME = txt_name rs!ADDRESS = txt_address rs!phone_no = txt_phone rs!VEHICLE_MODEL = COMB_MODEL rs!MONTH_MFG = txt_date_mfg rs!ENGINE_NO = txt_engine rs!chassis_no = txt_chassis rs!Color = txt_color rs!price = Val(Txt_price) rs.Update MsgBox "RECORD SAVED .. ", vbInformation + vbOKOnly RS1.Open "DELETE FROM PURCHASE_RECORD WHERE CHASSIS_NO ='" & Trim(txt_chassis.Text) & "'", db, adOpenKeyset, adLockOptimistic MsgBox " RECORD REMOVED FROM STOCK " txt_invoice = " " txt_name.Text = " " txt_address.Text = " " txt_phone.Text = " " COMB_MODEL.Text = " " txt_date_mfg.Text = " " txt_engine.Text = " " txt_chassis.Text = " " txt_color.Text = " " Txt_price.Text = " " End Sub Private Sub cmd_Cancel_Click() NM = MsgBox("ARE U SURE TO CANCEL ADD RECORD vbCritical) If NM = vbYes Then txt_invoice.Text = " " txt_name.Text = " " txt_address.Text = " " txt_phone.Text = " " COMB_MODEL.Text = " " txt_date_mfg.Text = " " txt_engine.Text = " " txt_chassis.Text = " " txt_color.Text = " " Txt_price.Text = " " Else End If End Sub Private Sub cmd_ext_Click() Unload Me End Sub ? ", vbYesNo +

------------------------------------------------------BY : LOVINA

Private Sub Form_Initialize() On Error GoTo erp db.Open "inventory_ks" rs.Open "select * from VEHICLE_SALE ", db, adOpenKeyset, adLockPessimistic Exit Sub erp: MsgBox "Error .. unable to open Database" End Sub Private Sub Form_Load() COMB_MODEL.AddItem "CD DAWN" COMB_MODEL.AddItem "SPLENDER PLUS" COMB_MODEL.AddItem "GLAMOUR" COMB_MODEL.AddItem "CD100 SS" COMB_MODEL.AddItem "PASSION PLUS" COMB_MODEL.AddItem "CD DAWN DELUXE" COMB_MODEL.AddItem "KRIZMA" COMB_MODEL.AddItem "CBZ" COMB_MODEL.AddItem "AMBITION" COMB_MODEL.Text = "PASSION PLUS" End Sub

------

------------------------------------------------------BY : LOVINA

CODING OF

SPARE PARTS SALE REPORT

Dim db As New ADODB.Connection Dim rs_cust As New Recordset Dim RS_PART As New Recordset Dim rs As New ADODB.Recordset Private Sub cmd_add_Click() RS_PART.Open "SELECT * FROM SPARE_STOCK WHERE PRODUCT_ID =" & COMB_PART.Text, db, adOpenKeyset, adLockPessimistic RS_PART!quantity = RS_PART!quantity - Val(txt_quantity) RS_PART.Update rs.AddNew rs!SALE_DATE = DTP_DATE.Value rs!INVOICE_NO = txt_invoice rs!CUST_ID = comb_id rs!cust_name = txt_custname rs!part_id = COMB_PART rs!PART_NAME = txt_part_name rs!quantity = txt_quantity rs!unit_price = Val(txt_unitp) rs!total_price = Val(txt_totalp) rs.Update MsgBox "RECORD SAVED .. ", vbInformation txt_invoice.Text = " " comb_id.Text = " " txt_custname.Text = " " COMB_PART.Text = " " txt_part_name.Text = " " txt_quantity.Text = " " txt_unitp.Text = " " txt_totalp.Text = " " End Sub Private Sub cmd_Cancel_Click() NM = MsgBox("ARE U SURE TO CANCEL ADD RECORD vbCritical) If NM = vbYes Then txt_invoice.Text = " " comb_id.Text = " " txt_custname.Text = " " COMB_PART.Text = " " txt_part_name.Text = " " txt_quantity.Text = " " txt_unitp.Text = " " txt_totalp.Text = " " Else End If End Sub Private Sub cmd_ext_Click() Unload Me End Sub Private Sub comb_id_Validate(Cancel As Boolean) Dim SSQL As String ? ", vbYesNo +

------------------------------------------------------BY : LOVINA

SSQL = "SELECT * FROM CUST_RECORD WHERE CUSTOMER_ID= " & Trim(comb_id.Text) rs_cust.Open SSQL, db, adOpenKeyset, adLockPessimistic If rs_cust.EOF Then MsgBox "CUSTID NOT FOUND ", vbInformation + vbOKOnly, "ERROR " comb_id.SetFocus Exit Sub Else txt_custname.Text = rs_cust!CUSTOMER_NAME txt_custname.Locked = True COMB_PART.SetFocus End If rs_cust.Close End Sub Private Sub COMB_PART_Validate(Cancel As Boolean) Dim SSQL As String SSQL = "SELECT * FROM SPARE_STOCK WHERE PRODUCT_ID= " & Trim(COMB_PART.Text) RS_PART.Open SSQL, db, adOpenKeyset, adLockPessimistic If RS_PART.EOF Then MsgBox "PARTID NOT FOUND ", vbInformation + vbOKOnly, "ERROR " COMB_PART.SetFocus Exit Sub Else txt_part_name.Text = RS_PART!PRODUCT_NAME txt_part_name.Locked = True txt_quantity.SetFocus End If RS_PART.Close End Sub Private Sub Form_Initialize() On Error GoTo erp db.Open "inventory_ks" rs.Open "select * from sale_sparepart", db, adOpenKeyset, adLockPessimistic rs_cust.Open "select * from cust_record", db, adOpenKeyset, adLockPessimistic Do While Not rs_cust.EOF = True comb_id.AddItem rs_cust!customer_id rs_cust.MoveNext Loop RS_PART.Open "select * from spare_stock", db, adOpenKeyset, adLockPessimistic Do While Not RS_PART.EOF = True COMB_PART.AddItem RS_PART!product_id RS_PART.MoveNext Loop RS_PART.Close Set RS_PART = Nothing rs_cust.Close Set rs_cust = Nothing Exit Sub erp: MsgBox "Error .. unable to open Database" End Sub

------------------------------------------------------BY : LOVINA

Private Sub Label1_Click() End Sub Private Sub txt_unitp_LostFocus() txt_totalp.Text = Val(txt_unitp.Text) * Val(txt_quantity.Text) End Sub

------------------------------------------------------BY : LOVINA

TESTING

------------------------------------------------------BY : LOVINA

TESTING
In the software development projected errors can be injected at any stage during the development at each phase. We use different techniques to detect and eliminate errors likely to remain undetected and these errors will reflect in the code. So, testing is the phase where errors from early phase are detected. The purpose of system testing is to identify and correct errors in the candidate system. As important as this phase, it is one that is frequently compromised. Typically, the project is schedule or the user is eager to go directly to conversion. In system testing, performance and acceptance standards are developed. Substandard performance or service interruptions that result in system failure are checked during the test. System testing is executing a program to check logical changes made in it and with the intention of finding errors. Effective testing does not guarantee reliability is design consideration. System testing is designed to uncover Weakness that was not found in earlier tests. This includes forced failure and validation of total system, as its users in the operational environment it. Generally, it beings with low volumes of transactions based on live data. The volume is increased until be maximum level for each transaction type is reached. The total system is also tested for recovery and fallback after various major failures to ensure that no data are lost during the emergency. All this is done with an old system still in operation. After the candidate system passes the test, the old system is discontinued.

APPROCHES TO TESTING:

UNIT TESTING SSSSSS

SYSTEM TESTING

------------------------------------------------------BY : LOVINA

UNIT TESTING :

In this type of testing, different modules are tested against the specification of the design. This is essentially the of verification provided of the code written for them . thus the goal of this is to test the internal logic used while coding. It also involves integration testing in which many tested modules are combined into one subsystem, which are tested together with dummy data against the design of the application. Unit testing comprises of a set of tests performed by the individual or the developer prior to the integration of smaller units into whole system. there are four categories of tests that programmer performs in the unit the testing. FUNCATION TESTS involves exercising the code with nominal input for which the results can be verified, as well as the boundary values, logical and special values. PERFORMANC TESTS determine on various criteria like execution time spent in various parts of units, perform throughput ,time and device utilization by program unit, performance testing is most effective at subsystem levels. STRESS TEST are design to intentionally break the unit. A great deal can be learnt about the strengths and weakness of the system by examining how a system break down. STRUCTURE TESTS are concerned with exercising the internal logic of a program and traversing particular execution paths. Sometimes functional, performance and stress testing are referred to as BLACK BOX testing while structure testing is to as WHITE BOX testing. Test converge criteria must be established for unit testing because program unit usually contain to many paths to permit exhaustive testing.

SYSTEM TESTING
Here all part of the system are combined into one subsystem, which are then tested together against the requirement of the system. As ultimately if the user is ultimately going to use the application so it becomes important to satisfy him. At this level the whole of software is tested against the test data given by the user. If at this stage acceptance standards.

------------------------------------------------------BY : LOVINA

The purpose elapsed time of the testing is to identify the errors in the candidate system .their first step is to establish performance and acceptance standards. Substandard performance or service interruption that in system failure are then checked during the test. Some of the performance criteria are: TURNAROUND TIME : It is the elapsed time between the receipt of the and input and availability of and evaluate all the factors that might have a turn around time for handling all applications. BLCKUP: Relates to the procedures to be used when the system is down. A backup plan might call for use of another system. The software for candidate system might be tested for compatibility with a backup computer. In case of partial computer break down, provisions must be made for dynamic reconfiguration of the system. FILE PROTECTION: It is related to storing files in a separate area for protection against fire, flood or natural disaster. Plans should also be made of reconstruction of damaged files through hardware malfunctions.

The Human Factor: It applies to the personal of the computer system .During system testing , lighting, air conditioning, noise and other environmental factors are evaluated with peoples desk ,chair CRTs etc.

System Testing Consists of the Following Steps :

Program Testing : Program represents the logical elements of the system. For a program to run successfully , it must compile and test data correctly and tie in a properly with other program modules .Programs testing checks out for :Syntax Errors : It is a program statement that violates one or more rules of the language in which it is written . The syntax errors are show through error message generated by the computer .

------------------------------------------------------BY : LOVINA

Logical Error : This deals with incorrect data field , out of range items , and invalid combinations . Since diagnostics do not detect logical errors ,the programmer must examine the output carefully for them. When the program is tested the actual output is compared with the expected output is compared with the expected output. In this process the program is broken into self contained portions , each of which can be checked at certain key points . String Testing : Programs are invariably related to and interact in the total system . Each program is tested to see whether it confirms to related programs in the system. Each portion of the system is tested against the entire module with both test and live data before the entire system is ready to be tested .

------------------------------------------------------BY : LOVINA

BIBLIOGRAPHY

Database programming with visual basic Curtis L.smith Michael C.Amundsen An integrated approach to software engineering Pankaj jalote Visual basic 6 in 21 Days Greg Perry Visual basic Mohammed Azam SQL,PL/SQL The programming Language of Oracle Ivan Bayross

------------------------------------------------------BY : LOVINA

Potrebbero piacerti anche