0% found this document useful (0 votes)
76 views

Himanshu Tandon

The document appears to be a practical file submitted by a student named Himanshu Tandon for their BCA program. It contains 43 programs written in VB.NET covering topics like basic input/output, data types, operators, selection statements, loops, functions, classes, inheritance and exception handling. Each program is numbered and includes the output for verification.

Uploaded by

vawok
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
76 views

Himanshu Tandon

The document appears to be a practical file submitted by a student named Himanshu Tandon for their BCA program. It contains 43 programs written in VB.NET covering topics like basic input/output, data types, operators, selection statements, loops, functions, classes, inheritance and exception handling. Each program is numbered and includes the output for verification.

Uploaded by

vawok
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 62

VIVEKANANDA INSTITUTE OF PROFESSIONAL STUDIES

VIVEKANANDA SCHOOL OF INFORMATION TECHNOLOGY

BACHELOR OF COMPUTER APPLICATION


VB.NET LAB FILE

Guru Gobind Singh Indraprastha University Sector - 16C,


Dwarka, Delhi - 110078

SUBMITTED TO: SUBMITTED BY:


Ms. Prerna Ajmani Himanshu Tandon
Assistant Professor 08429802019
VSIT BCA-III (EB)
VB.NET PRACTICAL FILE

INDEX

S.NO. Pg. No. Date Teacher’s


PROGRAM
Signature
Write a Program to print HELLO WORLD 6 22-08-2020
1
using one output statement in different line
Write a Program to convert a number or a 7 22-08-2020
2
letter into an ASCII Code
Wap to describe usage of different data 9 29-08-2020
3 types.

Write a Program to construct a basic 10 29-08-2020


4 Calculator

Wap that creates pi as a constant ad 11 05-09-2020


5 calculates area of a circle. The program should
also display the current date.
WAP to demonstrate unstructed exception 12 12-09-2020
6
handling.
WAP to demonstrate structure exception 13 12-09-2020
7
handling using try catch and finally block.
WAP to demonstrate multiple catch 14 19-09-2020
8
statements.
9 WAP to demonstrate nested try. 15 19-09-2020
Write a Program to select the largest of three 16 26-09-2020
10
numbers.
Write a Program to swap two numbers without 17 26-09-2020
11
using third variable.
Write a Program to print grades of student 18 26-09-2020
12
depending on the marks obtained.
Write a Program to design simple calculator 19 03-10-2020
13
using select case.
Write a menu driven program that accepts 2 20 03-10-2020
numbers from the user. The program should
implement all mathematical operations (add,
14
mul, div, sub, mod, power) depending upon
user’s choice. Use SELECT CASE.

15 Write a Program to print Fibonacci Series. 22 03-10-2020


Write a Program to print Factorial of a 23 10-10-2020
16
number.
17 Write a Program to check if a number is prime 24 10-10-2020

HIMANSHU TANDON 08429802019 BCA 3EB 2


VB.NET PRACTICAL FILE

or not.
Write a Program to print all prime numbers 25 10-10-2020
18
between 1 and 100.
Write a Program to reverse a given number. 26 17-10-2020
19

Write a Program to print the following star 27 17-10-2020


pattern (user defined):- * * * * *
****

20 ***

**

Write a Program to calculate Sum and Average 28 24-10-2020


21
of an Array.
Write a Program to insert and delete an 29 24-10-2020
22
element from any specific position in an Array.
23 Write a Program to add two matrices. 30 24-10-2020
24 Write a Program to find transpose of a matrix. 31 31-10-2020
25 Write a Program to find transpose of a matrix 32 31-10-2020
26 WAP to demonstrate Jagged Array 33 31-10-2020
WAP to demonstrate ArrayList and its 34 07-10-2020
27
functions
28 WAP to demonstrate Enumeration 35 07-10-2020
Write a Program to create a class named shape. 36 14-10-2020
The program should have one data member
29 Perimeter. Calculate the perimeter of Square,
Rectangle and Triangle by implementing
Function overloading.
Write a Program that creates a class named 37 14-10-2020
Room having three data members length,
30 width, height. The program should have a
member function volume that returns the
Volume of the room.
Write a Program to implement constructor 38 14-10-2020
31
overloading in the above program.
Write a Program to implement swapping of 39 21-10-2020
32 two numbers using call by value & call by
reference.
Write a Program to implement single 40 21-10-2020
33
inheritance and method overriding.
Write a Program to implement multiple 42 21-10-2020
34 inheritance with the help of interfaces.

35 Write a Program that accepts a string input 43 28-10-2020

HIMANSHU TANDON 08429802019 BCA 3EB 3


VB.NET PRACTICAL FILE

from a user, appends it with “hello” and


displays it in a message box on a button click
event. Create a Windows form Application for
it.

Write a Program that Accept grades from user 44 28-10-2020


in a textbox and use if-else condition to judge
the grade. On a button click event, if grade is
36 A, then display <outstanding result>. If grade
is B, then display <Average result>, else
Display <Bad Result>. Create a Windows
form Application for it.
Write a Program that adds six different fruits 45 05-12-2020
in a ComboBox on a ButtonClick event. Also
display the selected element in a textbox after
37 they are successfully added. Also, the colour
of the form should change to pink after 5
seconds. Create a Windows form Application
for it.
Wap to create simple calculator in window 46 05-12-2020
38
form.
Write a Program to fill list box with items, 47 05-12-2020
retrieve the total number of items in the list
39 box, sort the list box, remove some items and
clear the entire list box Create a Windows
form Application for it.
Write a program to create window form 50 12-12-2020
application that retrieves data from a table
40
created at Ms Access and binds it to data grid
view control at a button click event (Code).
Write a Program in which for the last (32th) 51 12-12-2020
program read all the data from student table at
41 a form load event with the help of data reader
Insert, Select, Update , Delete records from
data base. (At design time).
Write a Program in which for the last (32th) 53 12-12-2020
program read all the data from student table at
42 a form load event with the help of data reader
Insert, Select, Update , Delete records from
data base.(Code).
43 Build a Crystal Report. 56 14-12-2020

HIMANSHU TANDON 08429802019 BCA 3EB 4


VB.NET PRACTICAL FILE

PRACTICAL 1
WRITE A PROGRAM TO PRINT HELLO WORLD USING ONE OUTPUT
STATEMENT IN DIFFERENT LINE.

OUTPUT

HIMANSHU TANDON 08429802019 BCA 3EB 5


VB.NET PRACTICAL FILE

PRACTICAL 2
WRITE A PROGRAM TO CONVERT A NUMBER OR A LETTER INTO AN ASCII
CODE.
(a)

OUTPUT(a)

HIMANSHU TANDON 08429802019 BCA 3EB 6


VB.NET PRACTICAL FILE

(b)

OUTPUT(b)

HIMANSHU TANDON 08429802019 BCA 3EB 7


VB.NET PRACTICAL FILE

PRACTICAL 3
WRITE A PROGRAM TO DESCRIBE USAGE OF DIFFERENT DATA TYPES.

OUTPUT

HIMANSHU TANDON 08429802019 BCA 3EB 8


VB.NET PRACTICAL FILE

PRACTICAL 4
WRITE A PROGRAM TO CONSTRUCT A BASIC CALCULATOR

OUTPUT

HIMANSHU TANDON 08429802019 BCA 3EB 9


VB.NET PRACTICAL FILE

PRACTICAL 5
WAP THAT CREATES PI AS A CONSTANT AD CALCULATES AREA OF A CIRCLE.
THE PROGRAM SHOULD ALSO DISPLAY THE CURRENT DATE.

OUTPUT

1
HIMANSHU TANDON 08429802019 BCA 3EB
0
VB.NET PRACTICAL FILE

PRACTICAL 6
WAP TO DEMONSTRATE UNSTRUCTED EXCEPTION HANDLING.

OUTPUT

1
HIMANSHU TANDON 08429802019 BCA 3EB
1
VB.NET PRACTICAL FILE

PRACTICAL 7
WAP TO DEMONSTRATE STRUCTURE EXCEPTION HANDLING USING TRY
CATCH AND FINALLY BLOCK.

OUTPUT

1
HIMANSHU TANDON 08429802019 BCA 3EB
2
VB.NET PRACTICAL FILE

PRACTICAL 8
WAP TO DEMONSTRATE MULTIPLE CATCH STATEMENTS.

OUTPUT

1
HIMANSHU TANDON 08429802019 BCA 3EB
3
VB.NET PRACTICAL FILE

PRACTICAL 9
WAP TO DEMONSTRATE NESTED TRY.

OUTPUT

1
HIMANSHU TANDON 08429802019 BCA 3EB
4
VB.NET PRACTICAL FILE

PRACTICAL 10
WRITE A PROGRAM TO SELECT THE LARGEST OF THREE NUMBERS.

OUTPUT
1
HIMANSHU TANDON 08429802019 BCA 3EB
5
VB.NET PRACTICAL FILE

PRACTICAL 11
WRITE A PROGRAM TO SWAP TWO NUMBERS WITHOUT USING THIRD
VARIABLE.

1
HIMANSHU TANDON 08429802019 BCA 3EB
6
VB.NET PRACTICAL FILE

OUTPUT

PRACTICAL 12
WRITE A PROGRAM TO PRINT GRADES OF STUDENT DEPENDING ON THE
MARKS OBTAINED.

1
HIMANSHU TANDON 08429802019 BCA 3EB
7
VB.NET PRACTICAL FILE

OUTPUT

PRACTICAL 13
WRITE A PROGRAM TO DESIGN SIMPLE CALCULATOR USING SELECT CASE.

1
HIMANSHU TANDON 08429802019 BCA 3EB
8
VB.NET PRACTICAL FILE

OUTPUT

PRACTICAL 14
WRITE A MENU DRIVEN PROGRAM THAT ACCEPTS 2 NUMBERS FROM THE
USER. THE PROGRAM SHOULD IMPLEMENT ALL MATHEMATICAL

1
HIMANSHU TANDON 08429802019 BCA 3EB
9
VB.NET PRACTICAL FILE

OPERATIONS (ADD, MUL, DIV, SUB, MOD, POWER) DEPENDING UPON USER’S
CHOICE. USE SELECT CASE.

2
HIMANSHU TANDON 08429802019 BCA 3EB
0
VB.NET PRACTICAL FILE

OUTPUT

2
HIMANSHU TANDON 08429802019 BCA 3EB
1
VB.NET PRACTICAL FILE

PRACTICAL 15
WRITE A PROGRAM TO PRINT FIBONACCI SERIES.

OUTPUT

2
HIMANSHU TANDON 08429802019 BCA 3EB
2
VB.NET PRACTICAL FILE

PRACTICAL 16
WRITE A PROGRAM TO PRINT FACTORIAL OF A NUMBER.

OUTPUT

2
HIMANSHU TANDON 08429802019 BCA 3EB
3
VB.NET PRACTICAL FILE

PRACTICAL 17
WRITE A PROGRAM TO CHECK IF A NUMBER IS PRIME OR NOT.

OUTPUT

2
HIMANSHU TANDON 08429802019 BCA 3EB
4
VB.NET PRACTICAL FILE

PRACTICAL 18
WRITE A PROGRAM TO PRINT ALL PRIME NUMBERS BETWEEN 1 AND 100.

2
HIMANSHU TANDON 08429802019 BCA 3EB
5
VB.NET PRACTICAL FILE

OUTPUT

PRACTICAL 19
WRITE A PROGRAM TO REVERSE A GIVEN NUMBER.

OUTPUT

2
HIMANSHU TANDON 08429802019 BCA 3EB
6
VB.NET PRACTICAL FILE

PRACTICAL 20
WRITE A PROGRAM TO PRINT THE FOLLOWING STAR PATTERN (USER
DEFINED):-
*****
****
***
**
*

2
HIMANSHU TANDON 08429802019 BCA 3EB
7
VB.NET PRACTICAL FILE

OUTPUT

PRACTICAL 21
WRITE A PROGRAM TO CALCULATE SUM AND AVERAGE OF AN ARRAY.

2
HIMANSHU TANDON 08429802019 BCA 3EB
8
VB.NET PRACTICAL FILE

OUTPUT

PRACTICAL 22

2
HIMANSHU TANDON 08429802019 BCA 3EB
9
VB.NET PRACTICAL FILE

WRITE A PROGRAM TO INSERT AND DELETE AN ELEMENT FROM ANY


SPECIFIC POSITION IN AN ARRAY.

OUTPUT

PRACTICAL 23

3
HIMANSHU TANDON 08429802019 BCA 3EB
0
VB.NET PRACTICAL FILE

WRITE A PROGRAM TO ADD TWO MATRICES.

3
HIMANSHU TANDON 08429802019 BCA 3EB
1
VB.NET PRACTICAL FILE

OUTPUT

3
HIMANSHU TANDON 08429802019 BCA 3EB
2
VB.NET PRACTICAL FILE

PRACTICAL 24
WAP TO FIND TRANSPOSE OF A MATRIX.

OUTPUT

3
HIMANSHU TANDON 08429802019 BCA 3EB
3
VB.NET PRACTICAL FILE

PRACTICAL 25
WAP TO DEMONSTRATE DYNAMIC ARRAYS.

OUTPUT

3
HIMANSHU TANDON 08429802019 BCA 3EB
4
VB.NET PRACTICAL FILE

PRACTICAL 26
WAP TO DEMONSTRATE JAGGED ARRAY.

OUTPUT

3
HIMANSHU TANDON 08429802019 BCA 3EB
5
VB.NET PRACTICAL FILE

PRACTICAL 27
WAP TO DEMONSTRATE ARRAYLIST AND ITS FUNCTIONS.

3
HIMANSHU TANDON 08429802019 BCA 3EB
6
VB.NET PRACTICAL FILE

OUTPUT

3
HIMANSHU TANDON 08429802019 BCA 3EB
7
VB.NET PRACTICAL FILE

PRACTICAL 28

3
HIMANSHU TANDON 08429802019 BCA 3EB
8
VB.NET PRACTICAL FILE

WAP TO DEMONSTRATE ENUMERATION.

OUTPUT

3
HIMANSHU TANDON 08429802019 BCA 3EB
9
VB.NET PRACTICAL FILE

PRACTICAL 29

WAP TO CREATE A CLASS NAMED SHAPE. THE PROGRAM SHOULD HAVE ONE
DATA MEMBER PERIMETER. CALCULATE THE PERIMETER OF SQUARE,
RECTANGLE AND TRIANGLE BY IMPLEMENTING FUNCTION OVERLOADING

OUTPUT

4
HIMANSHU TANDON 08429802019 BCA 3EB
0
VB.NET PRACTICAL FILE

PRACTICAL 30
WAP THAT CREATES A CLASS NAMED ROOM HAVING THREE DATA MEMBERS
LENGTH, WIDTH, HEIGHT. THE PROGRAM SHOULD HAVE A MEMBER
FUNCTION VOLUME THAT RETURNS THE VOLUME OF THE ROOM

OUTPUT

4
HIMANSHU TANDON 08429802019 BCA 3EB
1
VB.NET PRACTICAL FILE

PRACTICAL 31
WAP TO IMPLEMENT CONSTRUCTOR OVERLOADING IN THE ABOVE
PROGRAM

4
HIMANSHU TANDON 08429802019 BCA 3EB
2
VB.NET PRACTICAL FILE

OUTPUT

PRACTICAL 32
WAP TO IMPLEMENT SWAPPING OF TWO NUMBERS USING CALL BY VALUE &
CALL BY REFERENCE

4
HIMANSHU TANDON 08429802019 BCA 3EB
3
VB.NET PRACTICAL FILE

OUTPUT

PRACTICAL 33
WAP TO IMPLEMENT SINGLE INHERITANCE AND METHOD OVERRIDING.

4
HIMANSHU TANDON 08429802019 BCA 3EB
4
VB.NET PRACTICAL FILE

PRACTICAL 34

4
HIMANSHU TANDON 08429802019 BCA 3EB
5
VB.NET PRACTICAL FILE

WAP TO IMPLEMENT MULTIPLE INHERITANCE WITH THE HELP OF


INTERFACES.

OUTPUT

PRACTICAL 35

4
HIMANSHU TANDON 08429802019 BCA 3EB
6
VB.NET PRACTICAL FILE

WAP THAT ACCEPTS A STRING INPUT FROM A USER, APPENDS IT WITH


“HELLO” AND DISPLAYS IT IN A MESSAGE BOX ON A BUTTON CLICK EVENT.
CREATE A WINDOWS FORM APPLICATION FOR IT

4
HIMANSHU TANDON 08429802019 BCA 3EB
7
VB.NET PRACTICAL FILE

PRACTICAL 36

WAP THAT ACCEPT GRADES FROM USER IN A TEXTBOX AND USE IF-ELSE
CONDITION TO JUDGE THE GRADE. ON A BUTTON CLICK EVENT, IF GRADE IS
A, THEN DISPLAY <OUTSTANDING RESULT>. IF GRADE IS B, THEN DISPLAY
<AVERAGE RESULT>, ELSE DISPLAY <BAD RESULT>. CREATE A WINDOWS
FORM APPLICATION FOR IT

OUTPUT

4
HIMANSHU TANDON 08429802019 BCA 3EB
8
VB.NET PRACTICAL FILE

PRACTICAL 37
WAP THAT ADDS SIX DIFFERENT FRUITS IN A COMBOBOX ON A BUTTONCLICK
EVENT. ALSO DISPLAY THE SELECTED ELEMENT IN A TEXTBOX AFTER THEY
ARE SUCCESSFULLY ADDED. ALSO, THE COLOR OF THE FORM SHOULD
CHANGE TO PINK AFTER 5 SECONDS. CREATE A WINDOWS FORM
APPLICATION FOR IT

OUTPUT

4
HIMANSHU TANDON 08429802019 BCA 3EB
9
VB.NET PRACTICAL FILE

PRACTICAL 38
WAP TO CREATE SIMPLE CALCULATOR IN WINDOW FORM

OUTPUT

5
HIMANSHU TANDON 08429802019 BCA 3EB
0
VB.NET PRACTICAL FILE

PRACTICAL 39
WAP TO FILL LIST BOX WITH ITEMS, RETRIEVE THE TOTAL NUMBER OF ITEMS
IN THE LIST BOX, SORT THE LIST BOX, REMOVE SOME ITEMS AND CLEAR THE
ENTIRE LIST BOX CREATE A WINDOWS FORM APPLICATION FOR IT

5
HIMANSHU TANDON 08429802019 BCA 3EB
1
VB.NET PRACTICAL FILE

OUTPUT

5
HIMANSHU TANDON 08429802019 BCA 3EB
2
VB.NET PRACTICAL FILE

5
HIMANSHU TANDON 08429802019 BCA 3EB
3
VB.NET PRACTICAL FILE

5
HIMANSHU TANDON 08429802019 BCA 3EB
4
VB.NET PRACTICAL FILE

PRACTICAL 40
WAP TO CREATE WINDOW FORM APPLICATION THAT RETRIEVES DATA FROM
A TABLE CREATED AT MS ACCESS AND BINDS IT TO DATA GRID VIEW
CONTROL AT A BUTTON CLICK EVENT (CODE).
Public Class Form1
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs)
Handles Button1.Click
        Dim con As New OleDb.OleDbConnection ' to create a connection
        con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=c:\users\Me\documents\visual studio 2010\Projects\p31_35\p31_35\ado.mdb"
        con.Open()
        Dim command As New OleDb.OleDbCommand("select * from Table1", con) ' to
create a query 
        Dim ds As New DataSet

        Dim da As New OleDb.OleDbDataAdapter(command) ' creating a data adapter


, passing query and connection string as parameters
        da.Fill(ds, "Table1")

        DataGridView1.DataSource = ds.Tables(0)

    End Sub
End Class

OUTPUT

5
HIMANSHU TANDON 08429802019 BCA 3EB
5
VB.NET PRACTICAL FILE

PRACTICAL 41
WAP IN WHICH FOR THE LAST (32TH) PROGRAM READ ALL THE DATA
FROM STUDENT TABLE AT A FORM LOAD EVENT WITH THE HELP OF DATA
READER
INSERT, SELECT, UPDATE, DELETE RECORDS FROM DATA BASE. (AT DESIGN
TIME)
Public Class Form1
    Dim con As New OleDb.OleDbConnection ' to create a connection
    Dim command As OleDb.OleDbCommand ' to pass some query
    Dim dr As OleDb.OleDbDataReader ' to read the data from database
    Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles
MyBase.Load
        con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Users\Me\Documents\Visual Studio 2010\Projects\p32\p32\ado.mdb"
        con.Open()
        command = New OleDb.OleDbCommand("select * from Table1", con)
        dr = Command.ExecuteReader()
        dr.Read()
        Display()
     End Sub
    Sub display()
        TextBox1.Text = dr(0)
        TextBox2.Text = dr(1)
        TextBox3.Text = dr(2)
    End Sub
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs)
Handles Button1.Click
        If (dr.Read()) Then
            display()
        Else
            MsgBox("This is the last record!")
            dr.Close()
        End If
    End Sub
End Class

5
HIMANSHU TANDON 08429802019 BCA 3EB
6
VB.NET PRACTICAL FILE

OUTPUT

5
HIMANSHU TANDON 08429802019 BCA 3EB
7
VB.NET PRACTICAL FILE

PRACTICAL 42
WAP IN WHICH FOR THE LAST (32TH) PROGRAM READ ALL THE DATA
FROM STUDENT TABLE AT A FORM LOAD EVENT WITH THE HELP OF DATA
READER
INSERT, SELECT, UPDATE, DELETE RECORDS FROM DATA BASE. (CODE)
Imports System.Data
Public Class Form1

    Dim con As New OleDb.OleDbConnection ' to create a connection


    Dim command As OleDb.OleDbCommand ' to pass some query
    Dim dr As OleDb.OleDbDataReader ' to read the data from database
    Dim i As Integer

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)


Handles MyBase.Load
        con.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Users\Me\Desktop\ado.mdb"
        con.Open()
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button1.Click
        command = New OleDb.OleDbCommand("INSERT INTO Table1 VALUES(@ID,@Name,@Age)",
con)
        command.Parameters.AddWithValue("@ID", TextBox1.Text)
        command.Parameters.AddWithValue("@Name", TextBox2.Text)
        command.Parameters.AddWithValue("@Age", TextBox3.Text)
        i = command.ExecuteNonQuery()
        MessageBox.Show(i & " record inserted in database")
        TextBox1.Clear()
        TextBox2.Clear()
        TextBox3.Clear()
End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button3.Click

        Dim dcomm As OleDb.OleDbCommand = New OleDb.OleDbCommand("delete from Table1


where ID=@id", con)
        dcomm.Parameters.AddWithValue("@id", TextBox1.Text)
        i = dcomm.ExecuteNonQuery()
        MsgBox(i & " record deleted from database")
        TextBox1.Clear()
        TextBox2.Clear()
        TextBox3.Clear()
    End Sub

5
HIMANSHU TANDON 08429802019 BCA 3EB
8
VB.NET PRACTICAL FILE

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button4.Click
        Dim rcomm = New OleDb.OleDbCommand("select ID,Stuname,Age from Table1 where
ID=@id", con)
        rcomm.Parameters.AddWithValue("@id", TextBox1.Text)
        dr = rcomm.ExecuteReader()
        dr.Read()
        display()

    End Sub
    Sub display()
        TextBox1.Text = dr(0)
        TextBox2.Text = dr(1)
        TextBox3.Text = dr(2)
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As


System.EventArgs) Handles Button2.Click
        Dim ucomm As OleDb.OleDbCommand = New OleDb.OleDbCommand("Update Table1 set
Age=@Age where ID=@id", con)
        ucomm.Parameters.AddWithValue("@Age", TextBox3.Text)
        ucomm.Parameters.AddWithValue("@id", TextBox1.Text)
        i = ucomm.ExecuteNonQuery()
        MsgBox(i & " record updated from database")
    End Sub

End Class

5
HIMANSHU TANDON 08429802019 BCA 3EB
9
VB.NET PRACTICAL FILE

OUTPUT

6
HIMANSHU TANDON 08429802019 BCA 3EB
0
VB.NET PRACTICAL FILE

PRACTICAL 43
BUILD A CRYSTAL REPORT
Imports Microsoft.Reporting.WinForms

Public Class Form1

    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles


MyBase.Load
        'TODO: This line of code loads data into the
'Database11DataSet.student' table. You can move, or remove it, as needed.
        Me.studentTableAdapter.Fill(Me.Database11DataSet.student)
        ReportViewer1.RefreshReport()
    End Sub
End Class

OUTPUT

6
HIMANSHU TANDON 08429802019 BCA 3EB
1
VB.NET PRACTICAL FILE

6
HIMANSHU TANDON 08429802019 BCA 3EB
2

You might also like