Posts

Showing posts from 2016

How to make a simple CRUD (Create,Retrieve,Update,Delete) in VB.NET

Image
1. Create database in MS SQL. 2. Add new table and create necessary columns. Then save. 3. Create a new project in visual studio and choose "windows form applications". 4. Add new module. We will put here the public connection string of our simple CRUDE program. 5. Place the code below. 'NAMESPACES FOR SQL Imports System.Data.Sql Imports System.Data.SqlClient Imports System.Data Module Module1     'PUBLIC VARIABLES FOR SERVERNAME,DATABASENAME,CONNECTION STRING AND ETC.     Public SERVER_NAME As String     Public DATABASE_NAME As String     Public SQL As String     Public CON As New SqlConnection()     Public SQLCMD As New SqlCommand()     Public SQLADAPTER As New SqlDataAdapter     Public DR As System.Data.SqlClient.SqlDataReader     Public Sub MAIN()         SERVER_NAME = "SAMSUNG-PC"  'INSTANCE NAME IN ...