Imports System.Data.SqlClient Public Class page Private Sub btnaddsuplier_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnaddsuplier.Click Dim connection As New SqlConnection connection.ConnectionString = " Data Source=Danawa;Initial Catalog=Store;Integrated Security=True" Dim cmd1 As SqlCommand dim ra as integer Try connection.Open() cmd1 = New SqlCommand("INSERT INTO dealer (dname) VALUES ('" & txtadddeletesupplier.Text & "')", connection) ra = cmd.ExecuteNonQuery() MsgBox("Category Added!!", MsgBoxStyle.Information, "Record Added = " & ra) Catch ex As Exception MsgBox("Category Failed to add!!", MsgBoxStyle.Critical) End Try end sub end class
dealer
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)