VB.NET : The Easy Way : How to Connect to SQL Server Database File (.mdf) in Visual Studio 2019




👨‍🏫 Please watch the top 3 most popular videos on my channel.

🥇 33 Million Views : Programming in Visual Basic .Net How to Connect Access Database to VB.NET : https://youtu.be/cwDqjmSmtMQ

🥈 13 Million Views : Visual Basic .Net : Search in Access Database - DataGridView BindingSource Filter (Part 1/2) : https://youtu.be/UoT2oava9ns

🥉 2 Million Views : Visual Basic .Net : Search in Access Database - DataGridView BindingSource Filter (Part 2/2) : https://youtu.be/e5Dvkw7moWg

💰 Donate $29 USD and Receive a free PDF Source Code of the above project:
https://www.paypal.com/paypalme/CodeAMinute/29USD
📧 Contact the instructor via this email: ibasskung@gmail.com

✔ This project is also included: (Export Data To Excel): https://youtu.be/whwQWX4sR7Y


💡 Premium Online Courses 💡
🎓 Master Visual Basic .NET and Access Database By Building the Point Of Sale System (POS)
📲 Enroll Now: https://bit.ly/2WcbRhX

🎓 Learn C# and SQL Server 2019 by Building Windows Forms Application with ADO.NET
📲 Enroll Now: https://bit.ly/37iLrRX

📚 See all courses here: https://bit.ly/2IJPxcm


🚀 4K UHD : Visual Basic .NET Project : The Easy Way! - How to Connect to a SQL Server Database File (.mdf) in Visual Studio 2019 (Visual Basic .NET .MDF Database Project).
🎦 Watch in 4K on YouTube: https://youtu.be/z6W8-g6i-ZE

🎓 In this video tutorial you will learn step by step:
- How to Create a SQL Server database file (.mdf) in Visual Studio 2019.
- How to Connect to SQL Server Database file (.mdf) using Wizard (Without Writing Any Code!)
- How to Perform a Simple CRUD Operation using VB.NET and SQL Server database in less than 10 lines of code!
- How to Solve a Problem: TableAdapterManager.UpdateAll() not working.


🚀 Visual C# .NET version: https://youtu.be/_cHmSLfsXOA


VB.NET Source Code by iBasskung.


Public Class Form1

Private Sub CustomersBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles CustomersBindingNavigatorSaveItem.Click

        ' <auto-generated> This code was generated by a tool.

        Me.Validate()

        Me.CustomersBindingSource.EndEdit()

        Me.TableAdapterManager.UpdateAll(Me.YourDatabaseDataSet)

        ' </auto-generated> 

End Sub

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

        'TODO: This line of code loads data into the 'YourDatabaseDataSet.Customers' table. You can move, or remove it, as needed.

        ' <auto-generated> This code was generated by a tool.

        Me.CustomersTableAdapter.Fill(Me.YourDatabaseDataSet.Customers)

        ' </auto-generated>

End Sub

Private Sub RefreshToolStripButton_Click(sender As Object, e As EventArgs) Handles RefreshToolStripButton.Click

        Me.CustomersTableAdapter.Fill(Me.YourDatabaseDataSet.Customers)

End Sub

Private Sub CloseButton_Click(sender As Object, e As EventArgs) Handles CloseButton.Click

        ' Note: This is a comment.

        ' Close this window.

        Me.Close()

End Sub

Private Sub PreviousButton_Click(sender As Object, e As EventArgs) Handles PreviousButton.Click

        BindingNavigatorMovePreviousItem.PerformClick()

End Sub

Private Sub NextButton_Click(sender As Object, e As EventArgs) Handles NextButton.Click

        BindingNavigatorMoveNextItem.PerformClick()

End Sub

Private Sub AddNewButton_Click(sender As Object, e As EventArgs) Handles AddNewButton.Click

        BindingNavigatorAddNewItem.PerformClick()

End Sub

Private Sub SaveButton_Click(sender As Object, e As EventArgs) Handles SaveButton.Click

        CustomersBindingNavigatorSaveItem.PerformClick()

End Sub

Private Sub DeleteButton_Click(sender As Object, e As EventArgs) Handles DeleteButton.Click

        BindingNavigatorDeleteItem.PerformClick()

End Sub

End Class


📚 See all courses here: https://www.udemy.com/user/tanin-sangngam


Follow me around

✔ Want to get updates on new courses or other cool free stuff? Just follow me on social media if that's your thing!

📺 Pages:
📍 https://www.facebook.com/CodeAMinute
📍 https://www.facebook.com/IbasskungTutorial
📍 https://www.facebook.com/codewithibasskung
📍 https://www.facebook.com/iBasskungAcademy

📺 YouTube:
📍 https://www.youtube.com/c/iBasskung

📺 Udemy:
📍 https://www.udemy.com/user/tanin-sangngam

📺 Twitter:
📍 https://twitter.com/IBasskung

📺 Pinterest:
📍 https://www.pinterest.com/ibasskung

📺 Blogger:
📍 .NET: https://codeaminute.blogspot.com
📍 JAVA: https://javacodeminutes.blogspot.com
📍 VBA: https://vbacodeminutes.blogspot.com

💯 THANK YOU SO MUCH! 💯

#VB #VisualBasic #FreeSourceCode #MDF #SQLServer #PointOfSale #POS #VisualStudio  

Comments