|
Imports System.IO
Imports System.Data
Imports System.Data.SqlClient
Partial Class Group
Inherits System.Web.UI.Page
Dim cn As New SqlClient.SqlConnection()
Dim cmd As New SqlClient.SqlCommand
Protected Sub btn_Save_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btn_Save.Click
Dim strCon As String = "Data Source=. ;Initial Catalog=MyDB ;Integrated Security=True"
cn.ConnectionString = strCon
Dim strsql As String
Try
strsql = "insert into tblGroup(name,blockcolor,ProjID) values('" + Me.txtGroup.Text + "',N'" + Me.drp_Color.Text + "'," + Me.drp_ProjName.SelectedValue.ToString() + ") "
Dim objcommand As New SqlClient.SqlCommand(strsql, cn)
cn.Open()
objcommand.ExecuteNonQuery()
Catch ex As Exception
Finally
cn.Close()
End Try
End Sub
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I have been working with different technologies and data more than 10 years.
I`d like to challenge with complex problem, then make it easy for using everyone. This is the best joy.
ICT Master in Norway 2013
Doctorandin at Technische Universität Berlin in Data Scientist ( currently )
-------------------------------------------------------------
Diamond is nothing except the pieces of the coal which have continued their activities finally they have become Diamond.
http://www.repocomp.com/