Complete CRUD Operation in Asp Net using VB With SQL Server Step by Step | ProgrammingGeek

preview_player
Показать описание

How to Perform CRUD Operation in VB.Net With SQL Windows Form

#CompleteCRUDOperationInAspNetUsingVBWithSQL #CRUDAspNetVBWithSQL #InsertDeleteUpdateSearchInVB #crud #aspnet #sql #crudsql #sqlcrud #vbnet

Just follow these steps-
1. Create a new Asp.Net project.
2. Design the project with Label, TextBox, DropdownList, radiobuttonlist, checkbox and button control.
3. Create database and table in SQL Server.
4. Connect sql server with visual studio.
5. Write code to execute CRUD operation Insert, Delete, Update and Search.

Prerequisites.
You should have installed SQL server and visual studio. you can use SQL server integrated with visual studio instead of SQL Server management studio.

This tutorial also covered-
2. Creating SQL server database and table in SQL server.
4. Calling method in button click_event.
5. Using method in page_load event.
6. Place connectionSting out of event.
7. Initializing connectionSting in all event.
8. How to load data in GridView.
9. How to get data from SQL server database to textBox and dropdownList.

Code sample-
Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

Dim productid As Integer = txtproductID.Text
Dim itemname As String = txtitemname.Text
Dim specification As String = txtspecification.Text
Dim unit As String = Dropunit.SelectedValue
Dim color As String = Radiocolor.SelectedValue
Dim insertdate As DateTime = txtdate.Text
Dim opening As Double = txtopeningqty.Text
Dim status As String = ""
If Checkregular.Checked = True Then
status = "Regular"
Else
status = "Irregular"
End If
connect.Open()
Dim command As New SqlCommand("Insert into ProductInfo_Tab values ('" & productid & "','" & itemname & "','" & specification & "','" & unit & "','" & color & "','" & insertdate & "','" & opening & "','" & status & "')", connect)
command.ExecuteNonQuery()
MsgBox("Successfully Inserted", MsgBoxStyle.Information, "Message")
connect.Close()
ListProduct()
End Sub

Private Sub ListProduct()
Dim command As New SqlCommand("select * from ProductInfo_Tab", connect)
Dim sd As New SqlDataAdapter(command)
Dim dt As New DataTable
sd.Fill(dt)
GridView1.DataSource = dt
GridView1.DataBind()
End Sub
------
This channel covers all the programming tutorial related with .Net- C#, linq, VB, SQL, Android, HTML, CSS, jQuery, Crystal Report and Microsoft Report.
So, please subscribe and keep in touch.

Visit my page in Facebook
------
Рекомендации по теме
Комментарии
Автор

Awesome video this most important for learning.

mdsaifuddinchy
Автор

It's very helpful tutorial for me. I have got much help from programminggeek. Thanks 😊😊☺️

nizamuddin
Автор

Very simple and very helpful, thnx a lot.

yasirfarid
Автор

Thank you for this beautiful explanation. I am grateful

waseemalsammoue
Автор

Extremely helpful tutorial. Thanks for uploading.

toytvkids
Автор

Hello Sir, I tried following your method and it fail if you leave any of the text boxes empty while inputing the data because you havent put any protector on the boxes. I will be thankful if you can help in this case.

benjisamuel
Автор

Hi, can you make a tutorial for uploading file into SQL Server? It would me really helping me a lot! Btw your tutor is awesome, thanks!

greigpaais
Автор

Can you share with me the code repository?

harshatata
Автор

Quite resourceful video but please i request you to stop using accent.There's no shame in using
indian accent for english.Otherwise the video is really very good and well explained

katharoy
Автор

Can you post a video on how to make it work online. It will be of great help.

rvinothkmr
Автор

How Do I insert Table in Visual Studio 2022 ??? I couldn't find the table button on the menu

swensonyee
Автор

You have to type all the data again to update a record (24:55)? No real-life application would have an update function like that. There should be an "Edit" button next to each record. Clicking it should bring up the form with existing data already filled in, letting the user make changes where needed -- not retype everything, are you kidding me? But of course you can't do that, because the Gridview control doesn't let you access each row's data. The Gridview control is garbage here, and you are better off with a plain HTML table that gives you greater control. That's something ASP classic can do. Same with the delete function -- the user shouldn't have to type anything to delete a record.

rabidfollower
Автор

Hi bro I am new to WPF and .net I need your help how to contact you if u please help me because it explanation very clearly and understand clearly please help bro.

KarthiKeyan-hyhu
Автор

Is there a guide on how to download this sql?

kuyajohntv
Автор

Sir i need a littlw help regarding crud operation in my app, it's a little difficult, Can you help me plz..

abid_khan
Автор

can i do this example with visual studio 2012 or 2013

ouadieibenyahya
Автор

i do not get option for extender in insert dat text box. please explain

yasir
Автор

please can you give me .aspx source code in comment ?

manelkhayat
Автор

CAN YOU MAKE SMALL WEBSITE USING ASP.NET WITH VB LANGUAGE

naileshmaheta