VB窗体控件设计登录注册页面
界面如下
代码如下
Public Class Form1
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
End Sub
'登录
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Dim myconnect As New SqlClient.SqlConnection
Dim mycommand As New SqlClient.SqlCommand
Dim myread As SqlClient.SqlDataReader = Nothing
Dim mytable As New DataTable()
myconnect.ConnectionString = "server=127.0.0.1;database=master;integrated security=true;uid=chk;pwd=chk123456"
myconnect.Open() '打开数据库
'设置命令属性
mycommand.Connection = myconnect
mycommand.CommandType = CommandType.Text
Dim name As String
Dim password As String
name = Me.TextBox1.Text
password = Me.TextBox2.Text
mycommand.CommandText = "select * from test w


