Imports System.Data.Sql
Imports System.Data.SqlClient
Public Class Form1
    Dim connetionString As String

    Dim connection As SqlConnection

    Dim adapter As New SqlDataAdapter

    Dim sql As String



Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim connetionString As String

        Dim cnn As SqlConnection

        connetionString = "Data Source=obeng\obeng;Initial Catalog=mangementsystem;integrated security=true"

        cnn = New SqlConnection(connetionString)

        Try

            cnn.Open()

            'MsgBox("Connection Open ! ")

            cnn.Close()

        Catch ex As Exception

            MsgBox("Can not open connection ! ")

        End Try
    End Sub