01.
Private
Sub
Button2_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
Button2.Click
02.
connection =
New
SqlConnection(conStr)
03.
connection.Open()
04.
Dim
fname
As
String
= TextBox1.Text
05.
sql =
"insert into Table1(name) values ('"
& fname &
"')"
06.
command =
New
SqlCommand(sql, connection)
07.
command.ExecuteNonQuery()
08.
connection.Close()
09.
End
Sub