Visual Studio SQL Database Tutorial 01 - SQL Server Tutorials using Visual Studio - C# Tutorials

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello guys welcome to coding cafe my name is Muhammad Ali and we are going to work on the SQL crud operations that is create update delete and insert and also we will be creating the sign in and sign up form and yeah let's do that I mean let's start this so first of all openly Microsoft SQL Server management studio and also open the which will studio so first let create a brand new project so we will see sharp windows form application and the name of or this application will be lets say database project now let's click OK and our new project database project is created successful project now what we gonna do next is that first of all let's rename this from 1 ok this default form which is created so click here rename this to sign up first we will insert the data into the SQL server to the microsoft SQL server ok so that one once the user create a new account then we will work on the sign in and then we will perform the update delete insert further operations so yeah let's do this so the name of this form is sign up ok so click yes and here you can see sign up dot CS so this is the name of or this form and now click here and the name is sign up and also let's change the text of this form to sign up now let's add some text fields here ok so go to the tool box and let's say add a level first just to display that this is the signup form so here we can say sign up and come here and we need to change this fault you can choose any font you want okay I will change it to Arial bold and it should be 20 now let's add another level so it must be bold and 14 will be good so this one is for the name let's change it quickly we will ask the user first let's add text box should text box and let's change this to 14 so name and let's compare this now for the email and also for the password so yeah change this to email password this is the email and now this is the password name email password once now we need a combo box let's drag and drop this and this will be for the country let's change this to country let's also change the size of it to 16 so yeah that's it it is all about our form now we need a button so let's add a button drag and drop this will be over sign-up button so change this text to sign up and also let's change the text default size to 14 bold that's it now let's assign quickly name to all these fields so this is our T X T now this one is txt email txt password and this way is txt country let's give name to over button also so this one will be beauty and sign up now let's add a connection I mean let's create a database so go to the Microsoft SQL Server management studio and here you can see we have this database so if you click here right right click here on this database and new database so the name of our new database will be let's create it by the name users or let's say our app name that is let's say we are going to create our social network let us say this will be basically our database name and nothing else so there are ways name is social network and then now click on this OK button so now if you expand this okay let's refresh this from here so you can see social network database is added successfully to our databases now here right click and from here you can simply click on first expand this social network database name here you can see these tables and from this table I mean above hair click and this will appear so click on this table and now here we can create our first table inside this social network database so according to our app we are going to enter the name email password end country so let's do that so the first one is and every user will have user ID ok so we have to create there too so we can say ID and it must be integer type of a so we can simply say int and allow nulls unchecked then we will have the name for the users and it must be an varchar' then we have email and watch our is our third column and now the fourth one will be password it must also be n watch our and the last one is the country it must also be and watch our so uncheck this we do not allow any null data in our database ok now this is what I mean this will be the ID for each ok so this is our ID column we want to imitate increment this automatically ok not manually so you can see here even if you click here you can see you can also set a primary key to this ID column if you want ok so yes we will do that so set I am Rick you to it and also come down here and here we this ID identity specification now before you do that make sure to select this ID column okay like that and now here you can see identity specification and here you can see this is identity so click that and press yes select yes from here now we want to increment it automatically whenever a new record is inserted database successfully so this is the increment number you want incremented by one so yes we wanted to increment it by 1 and identity seed it will proceed in the second record added then the next ID will be 2 then 3 then 4 ok so here you can give it any value that is that say if you give 5 here then the new record will be incremented by 5 so we just want one increment of it so yeah that's it now this is a word table and from here make sure to give name to our this first table so let's say the name of this table is users ok and if you see here there are also other information given which is our database name social network and server name is this one which is text of each tied one h.o see in your case your server name will be different ok so yeah that's it now you can simply click on this Save button so once you click on this cell button then here you can simply expand the stables and now refresh this let's refresh this as a whole ok I found this database so refresh this now let's expand our social network then tables and still our table is not added here to the tables ok so let's click on this say ok which is this one also you can click on this file and click on this save all now let's refresh this once again to see if it is added or not social network tables and now it is at it successful ok so whenever you create a new table make sure to click on this save also you can save it from here that is same and the shortcut key for that is ctrl shift s so you can see that our new table do you are users which is by the name users I mean ok so what users table is created successfully now that's it for this video and in the next video we will connect over this we will connect our database to our app ok over this app and we will insert or you can say allow a user to sign up and create his first account in this air so yeah see you guys in the next wait you bye for now
Info
Channel: Muhammad Ali's Coding Cafe
Views: 58,271
Rating: undefined out of 5
Keywords:
Id: OWWvTJX8wo4
Channel Id: undefined
Length: 11min 26sec (686 seconds)
Published: Sun Dec 16 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.