How to Connect Visual Studio with SQL Server Database Using VB.Net | swift learn

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] if you don't subscribe my channel yet please subscribe and press the bell icon for upcoming videos start Visual Studio this tutorial I will show how to connect SQL Server database with visually study using vb.net gel studio project location is vb.net project tutorial folder select the location and now name the project because I'm getting a new project the project name is I just named it my test application now just taken okay my project is created now I'm going to design this form to connect act connect s Kasturba database with visual studio using vb.net to design this form I'm gonna add in level control this level control I will use as title and my title is connect visual studio with SQL in BB okay now change the color for color and since the font size of this level control is 18 and 4 volt - okay but it's not displaying yet because of the background color and the font color is same so change the background color background Becca a lot of this form is a green just select green yes now it's looking fine now I'm gonna add a button control to display records to connect and display records in their data grid view change the text of this button a button text is load okay now font size fording yes now it's looking fine now I'm gonna add a data grid view control to display records from the SQL Server database table to will this form may be done in this form okay now design is already okay it's the button click event here I'll write code to display all records in the data grid view from aspects of a database is BB okay if you don't have Survey Explorer add it from the you manual okay I already have several extras so now I am gonna connect with the SQL Server database add connection if you already have database use add connection and if you don't have database you can create a simple database I already have database so my database server is that every sermon but whatever server name is database server and these are the database after selecting a database it will be connected in server Explorer and connect to a visual studio as well I'm just selecting the database catalog DB but now if you don't have database use clean SQL Server database okay first of all select server server name is database server and database name is you can use Windows authentication or escort service indication my database name is my test DB click on OK okay see that my database in the database server my database the DV is already created but there's no table I'm gonna writing I'm gonna creating a table they will column is ID integer type name and Pirkle 50 address and Parker 150 you can create database using SQL Server SQL server or you can use you can create database and table using server Explorer okay ID is primary key and name the table my table name is user info underscore tab okay my table is created now I'm gonna inserting some records in the stable ID Wow 1:01 named John address USA is 25 SEC's Mel okay and second record days want you to name Christina address USA and there is 20 SEC's famous okay I just inserting inserted to records in the database table and now I'm going to displaying these records in the data grid view windows form name Kahn as new SQL connection because I'm connecting with the SQL Server database so SQL connection equal to new SQL connection my SQL connection is all first of all you should add in for system to dead added SQL client import click on the import system the dotted add SQL client is imported okay now I'm gonna write connection SQL Server database connection right click on the database in the server Explorer and click on property in this property you can see the connection is staying that is there's equal to just select to double click to select or right-click and select ok now click copy and paste it yes now it's connected with your project now right come on Dempsey MD as SQL command equal to new SQL command my SQL command is I am just waiting for me to display records from the database table to the data grid view in that case my command is select star from user or info underscore tab okay now dim as this is for dated after SQL that I'd after all the command CMD okay now declared editable dim DT as new data table now finally load data adapter indebted ability a dot fill DT finally display records display DT in datagridview okay delegate be wondered data towards equal to DD now debug just just click on load yes it's displaying all the records for inserted in the database table okay now sure to build at and I am gonna inserting one more records and I will display whether it's working or not okay one two three Tromp you say 255 A's and success mal debug again just click on load yes all the records are displaying yeah you
Info
Channel: Swift Learn
Views: 57,580
Rating: undefined out of 5
Keywords: swift learn, connect sql server with visual studio, sql server, how to, sql, how to connect sql with visual studio, connect sql with visual studio, connect visual studio to sql server, connect with database in vb, visual studio code, vb with sql server, how to connect visual studio to sql server, connect sql database to vb.net, vb.net with sql database, vb.net with sql server tutorial
Id: FNSXQxo7Zeo
Channel Id: undefined
Length: 8min 18sec (498 seconds)
Published: Wed Jul 01 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.