0% found this document useful (0 votes)
60 views11 pages

A Micro Project Report On: Proff. Rohit Kautkar

This document describes a micro project report submitted by four students - Kartik Patel, Seema Korade, Sanket Deore, and Abhijeet Chaudhari, under the guidance of Professor Rohit Kautkar. The report discusses creating a VB.net windows application to access a SQL Server database using ADO.NET. It outlines requirements, creating ADO.NET objects like SqlConnection and SqlCommand, using these objects to open a connection, execute queries, and retrieve data from the database. The report also describes viewing the database in Server Explorer and using it to open a connection and bind data to a data grid on the form.

Uploaded by

Bruce Banner
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)
60 views11 pages

A Micro Project Report On: Proff. Rohit Kautkar

This document describes a micro project report submitted by four students - Kartik Patel, Seema Korade, Sanket Deore, and Abhijeet Chaudhari, under the guidance of Professor Rohit Kautkar. The report discusses creating a VB.net windows application to access a SQL Server database using ADO.NET. It outlines requirements, creating ADO.NET objects like SqlConnection and SqlCommand, using these objects to open a connection, execute queries, and retrieve data from the database. The report also describes viewing the database in Server Explorer and using it to open a connection and bind data to a data grid on the form.

Uploaded by

Bruce Banner
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/ 11

A

Micro Project Report


On
VB.net forn using sql server
Submitted by:-

I. Kartik Pramod Patel

II. Seema Gotiram Korade

III. Sanket Deoba Deore

IV. Abhijeet Vijay Chaudhari


____________________________

Under the Guidance of:-

Proff. Rohit Kautkar


__________________________________

In the Partial Fulfilment of Fourth Semester of Diploma in Information Technology

Department of Information Technology


Sandip Polytechnic
Mahiravani, Nashik - 422213

Affiliated to
Maharashtra StateBoard of Technical Education
Academic Year 2020-2021

Maharashtra State
Board of Technical Education

Certificate

This is to certify that: Abhijeet Vijay Chaudhari Roll No. 32


of Fourth Semester of Diploma in Information Technology of Institute, Sandip
Polytechnic (Code:1167) has completed the Micro Project satisfactorily in subject
DATABASE MANAGEMENT (DMA) for the academic year 2020- 2021 as prescribed in the

curriculum.

Place: Nashik Enrollment No: 1911670454

Date: 16/06/2021 Exam. Seat No: 357155

Subject Teacher Head of the Department Principal


VB.net forn using sql server
Summary:
This article describes how you can use ADO.NET to open a SQL Server database by using
the SQL Server .NET data provider. ADO.NET gathers all of the classes that are required
for data handling. The System.Data.SqlClient namespace describes a collection of
classes that are used to programmatically access a SQL Server data source. You can
access ADO classes through the System.Data.OleDb namespace to provide support for
OLE DB databases.
In this article, connections are set up both programmatically and using the Visual Studio
.NET Server Explorer. The code samples in this article use the SqlConnection, SqlCommand,
and SqlDataReader ADO.NET objects.
Requirements:
The following list outlines the required hardware, software, network infrastructure, and
service packs that you need:
• Microsoft SQL Server
• Visual Basic .NET
Note:
SQL Server and Visual Basic .NET must be installed and running on the same computer.
In addition, the user must be able to use Windows Integrated Security to connect to SQL
Server.
This article assumes that you're familiar with the following topics:
• ADO.NET concepts
• SQL Server concepts and Transact-SQL (T-SQL) syntax
• North wind sample database
Create Visual Basic .NET Windows application:
1. Start Visual Studio .NET, and create a new Visual Basic Windows Application
project named SQLDataAccess.2. Open Form1. In the first line of Form1.vb, add a reference to the
ADO.NET
namespace as follows:
Vb:
3. From the Windows Start menu, point to Programs, point to Microsoft SQL
Server, and then click SQL Server Service Manager to ensure that the SQL
Server service is running on your computer.
4. Set the Server property to the name of your computer, and then set
the Services property to MSSQLServer.
5. If the service isn't running, click Start.
6. Close the SQL Server Service Manager dialog box.
Create ADO.NET objects:
Modify the Form1 class as follows:
Vb
The SqlConnection object establishes a database connection, the SqlCommand object runs a
query against the database, and the SqlDataReader object retrieves the results of the query.
Public Class Form1
Inherits System.Windows.Forms.Form
'Create ADO.NET objects.
Private myConn As SqlConnection
Private myCmd As SqlCommand
Private myReader As SqlDataReader
Private results As String
Imports System.Data.SqlClientUse the SqlConnection object to open SQL Server connection:
1. To set up the connection string of the SqlConnection object, add the following
code to the Form1_Load event procedure:
2. To set up the Command object, which contains the SQL query, add the following
code to the Form1_Load event procedure:
SqlConnection uses your Windows logon details to connect to the Northwind database on your
computer.
Use the SqlDataReader object to retrieve data from SQL Server:
1. Add the following code to the Form1_Load event procedure:
'Create a Connection object.
myConn = New SqlConnection("Initial Catalog=Northwind;" & _
"Data Source=localhost;Integrated Security=SSPI;")
'Create a Command object.
myCmd = myConn.CreateCommand
myCmd.CommandText = "SELECT FirstName, LastName FROM Employees"
'Open the connection.
myConn.Open()
myReader = myCmd.ExecuteReader()2. When the myCmd.ExecuteReader method is executed,
SqlCommand retrieves two fields
from the Employees table and creates a SqlDataReader object
3. To display the query results, add the following code to the Form1_Load event procedure:
'Concatenate the query result into a string.
Do While myReader.Read()
results = results & myReader.GetString(0) & vbTab & _
myReader.GetString(1) & vbLf
Loop
'Display results.
MsgBox(results)
The myReader.Read method returns a boolean value, which indicates whether there are more
records to be read. The results of the SQL query are displayed in a message box.
4. To close the SqlDataReader and SqlConnection objects, add the following code to
the Form1_Load event procedure:
'Close the reader and the database connection.
myReader.Close()
myConn.Close()
5. Save and run the project.
View database in Server Explorer:
1. On the View menu, click Server Explorer.
2. Right-click Data Connections, and then click Add connection.
3. In the Data Link Properties dialog box, click localhost in the Select or enter a
server name box.
4. Click Windows NT Integrated Security to log on to the server.
5. Click Select the database on the server, and then select Northwind database from
the list.
6. Click Test Connection to validate the connection, and then click OK.
7. In the Server Explorer, click to expand the Data Connections tree so that
the Employees table node expands. The properties of individual fields appear in
the Properties window.Use Server Explorer to open SQL Server connection:
1. View Form1 in Design view.
2. Drag the FirstName and LastName database fields from Employees table in
Server Explorer, and drop these fields onto Form1.
A SqlConnection and SqlDataAdapter object are created on the form.
3. From the View menu, click Toolbox.
4. On the Data tab, drag a DataSet object (DataSet1), and drop it onto the
form.
5. In the Add Dataset dialog box, click Untyped dataset, and then click OK.
6. Insert a line of code before the DataReader and Connection objects are closed
in the Form1_Load event procedure. The end of the procedure should appear
as follows:
SqlDataAdapter1.Fill(DataSet1, "Employees")
myReader.Close()
myConn.Close()
7. On the Window Forms tab of the toolbox, drag a DataGrid control, and drop it
onto Form1.
8. To bind the DataGrid to the DataSet object that you created earlier, add the
following code to the Form1_Load event procedure before
the myReader.close() line of code:
DataGrid1.SetDataBinding(DataSet1, "Employees")
9. Save and run the project.Rational: (purpose of project):
A student registration form is used to register students for a course. No matter what subject you
teach, this free Student Registration Form allows students to quickly and easily sign up for your
class online. Simply customize the form to meet your needs, publish it on your school’s website,
and watch the registrations roll in! Students can provide their contact information, detail their
academic history, list extracurriculars and additional interests, and even pay registration fees if
required. Submissions will be sent to your secure JotForm account, easily accessible on any
device — even offline.
This Student Registration Form was initially designed for university-level courses — however,
you won’t need to take a class on coding to make adjustments to the form. Our drag-and-drop
Form Builder makes it easy to add form fields, change the template design, and even upload
your
school logo for a more professional look. You can even integrate the form with a secure gateway
like Square or PayPal to safely accept payments for class registration fees. Feel free to take
advantage of our other integrations as well — send submissions directly to your cloud storage
accounts, online spreadsheets, email list, and more. With an advanced Student Registration
Form
reducing your teacher workload, student enrollment is as easy as A-B-C!
Aims/Benefits of the Micro-Project(explain advantage of current
system compare to previous system):
i. Save Time Clerks and classified workers spend countless hours manually sorting, retrieving,
entering and alphabetizing data with traditional registration processes. In addition, when
students fail to bring in all of the individual forms that are required for registration, further time
is wasted tracking down these forms.
ii. Save Money Switching to online registration is a proven strategy for saving schools money.
With traditional, paper-based registration processes, schools spend thousands of dollars in
mailing, paper and printing costs.
iii. Build Community Apart from freeing up time for clerks and classified workers, online
registration for schools allows school principals to spend more time interacting with students
and parents. This is because with online registration, principals no longer have to waste time
troubleshooting the many problems that arise with traditionalregistration processes.
iv. Happy Parents A key aspect in managing school operations is ensuring that parents are
happy. After all, parents offer invaluable contributions (both monetary and through volunteer
work). Online registration for schools is a proven parent-pleaser.
v. Save the Planet “It takes one 15-year old tree to produce half a box of paper.??? One of the
foremost concerns of this era is conservation. With issues such as deforestation,
overpopulation, Greenhouse Gas effect, Global warming, etc., schools have been increasingly
trying to educate the next generation about environmental conservation. Most schools have
already integrated recycling systems: separating bins for plastic, metal, electronic, and paper. By using a
web-based technology system, like K-12 Online, schools can become more ecofriendly
and teach by example.
Course Outcomes Achieved:
Literature Review:
Actual Resources Used:
Sr. No.
Name of
Resource/Material
Specification
Quantity
Remarks
1
Hardware Resource
Processor i3/HDD-
1TB/RAM-8GB
1
Available
2
Software Resource
Microsoft Office
2010
1
Available
3
Any Other Resource
Printer
1
Available********************* Code for Connection String *********************
Hide Copy Code
Dim SQL_Connection As New SqlConnection
SQL_Connection.ConnectionString = "Data Source =serverip; Initial
Catalog=DatabaseName; User ID=DatabaseUserName;
Password=DatabasePassword; Connect Timeout=0"
********************* Code for Insert Data ***************************
Hide Copy Code
SQL_Connection.Open()
MyCommand = New SqlCommand("Insert Into tablename
values(1,'name','address')", SQL_Connection)
MyCommand.ExecuteNonQuery()
SQL_Connection.Close()
*********************** Code for Retrieve Data ***********************
Hide Copy Code
SQL_Connection.Open()
Dim MyDataSet As New DataSet
Dim MyDataAdapter As New SqlDataAdapter("select * from TableName
where Condition", SQL_Connection)
MyDataAdapter.TableMappings.Add(0, TableName)
MyDataSet = New System.Data.DataSet
MyDataAdapter.Fill(MyDataSet)
MyDataSet.Tables(0).TableName = TableNameDataGridViewName.DataSource = MyDataSet.Ta-
bles(0)
*********************** Code2 for Retrieve Data ***********************
Hide Copy Code
SQL_Connection.Open()
Dim MyQuery as String = "Select * from tablename where condition"
Dim Command = New SqlCommand(MyQuery , SQL_Connection)
Dim DataReader As SqlDataReader
DataReader = Command.ExecuteReader
Dim RowNo As Long = 0
While DataReader.Read
datagridviewname.Rows.Add(1)
datagridviewname.Rows(RowNo).Cells(0).Value = DataReader!ID
datagridviewname.Rows(RowNo).Cells(1).Value = DataReader!Name
datagridviewname.Rows(RowNo).Cells(2).Value = DataReader!Address
datagridviewname.Rows(RowNo).Cells(3).Value = DataReader!PhoneNo
datagridviewname.Rows(RowNo).Cells(4).Value = DataReader!Description
RowNo = RowNo + 1
End While
DataReader.Close()
SQL_Connection.Close()
Group Members Details

Sr. No Name of Group Members Roll No Enrollment No Seat No.

1 Kartik Pramod Patel 01 1711670209 357124

2 Seema Gotiram Korade 07 1911670429 357130

3 Sanket Deoba Deore 25 1911670447 357148

4 Abhijeet Vijay Chaudhari 32 1911670454 357155


Weekly Progress Report

Signature of
Sr. No Week Activity Performed Date
Guide
1 1st Week Topic Discussion 25/03/2021

2 2nd Week Topic Selection 26/3/2021

3 3rd Week Collection of Data 01/04/2021

4 4th Week Collection of Data 08/04/2021

5 5th Week Analysis of Collected Data 09/04/2021

Design of Website/Creation of
6 6th Week 15/04/2021
Video/Animation
Development of Website/Creation of
7 7th Week 16/04/2021
Video/Animation
Making of Website/Creation of
8 8th Week 22/04/2021
Video/Animation

9 9th Week Making of Website 23/04/2021

10 10th Week Making of Websites 29/04/2021

11 11th Week Making of Database 30/04/2021

12 12th Week Testing 06/05/2021

13 13th Week Compilation of Report 07/05/2021

14 14th Week Compilation of Presentation 28/05/2021

15 15th Week Presentation of Seminar 03/06/2021

16 16th Week Final Submission 11/06/2021


Evaluation Sheet for the Micro Project

Academic Year: 2020-2021 Subject & Subject Code: DATABASE MANAGEMENT (22416)
Course & Course Code: IF4I Name of the Faculty: Proff. Rohit Kautkar
Semester: IV

Title of Micro Project: VB.net forn using sql server

COs addressed by Micro Project:

1. Prepare images using different colour models


2. Edit images using graphics processing tools
3. Build website with multimedia contents
4. Develop 2D Animation
5. Develop 3D Animation

Comments/suggestions about team work /leadership/inter-personal communication (if any)-

…………………………………………………………………………………………………………………

……………………………………………………………………………………………………………

Marks out of ___ Marks out of ____ for


Roll Total
Name of Student for performance performance in oral/
No. Marks
in group activity presentation

32 Abhijeet Vijay Chaudhari


Name & Signature of Faculty Name & Signature of HOD

You might also like