First thing is that you need to use the connecting string of your database that is present inside the SQL Server. Once that has been captured you can use that connection string while creating an
SqlConnection[
^] object instance so that the code would use that database for executing different command sets on it.
I have written
an article[
^] that describes a few aspects of connecting the SQL Server database to your .NET application, (sadly that was written in C#, you can convert the code from C# to your VB.NET code using
Telerik converter[
^]) and you will then be able to use the
SqlCommand[
^] object to execute different commands, like SELECT, INSERT INTO etc. The remaining stuff like GridView, and Button events are related to your framework and have nothing to do with SQL so that is why I will leave that upto you to check MSDN for these objects and their events (depending on your framework e.g. WPF or Win Forms etc).