Conn

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Conn as PDF for free.

More details

  • Words: 133
  • Pages: 1
Imports System.Data.SqlClient

Partial Public Class WebForm23 Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub btnclear_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnclear.Click txtfirstname.Text = " " txtmiddlename.Text = " " txtlastname.Text = " " txtaddress.Text = " " txteducation.Text = " " End Sub Private Sub btnsubmit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsubmit.Click Dim con As New System.Data.SqlClient.SqlConnection Dim SQLstrng As String con.ConnectionString = "Password=dbserversql;Persist Security Info=True;User ID=sa;Initial Catalog=Northwind;Data Source=DBSERVER" con.Open() SQLstrng = "insert into candidate values('" & txtfirstname.Text & "' , '" & txtmiddlename.Text & "','" & txtlastname.Text & "','" & txtaddress.Text & "','" & txteducation.Text & "')" Dim Cmd As New System.Data.SqlClient.SqlCommand(SQLstrng, con) 'Cmd.CommandText = SQLstrng Cmd.CommandType = CommandType.Text 'con.Open() Cmd.ExecuteNonQuery()

con.Close() End Sub End Class

Related Documents

Conn
November 2019 16
Conn
June 2020 11
Steven Conn
May 2020 17
Immig Foia Conn.
November 2019 8
As L2 Den Conn
June 2020 7
Sindrome De Conn
November 2019 10