会员管理系统之修改会员数据
Sub Page_Init(ByVal sender As Object, ByVal e As EventArgs)Dim objConn As New OleDbConnection()
objConn.ConnectionString = "Provider=Microsoft.Jet.OleDB.4.0;" & "Data Source=" & Server.MapPath("/作业/HTGL.mdb")
objConn.Open()
Dim objCmd As New OleDbCommand()
objCmd.Connection = objConn
= "Select * From 会员用户 Where 账号='" & User.Identity.Name & "'"
Dim objReader As OleDbDataReader = objCmd.ExecuteReader()
objReader.Read()
showUserId.Text = objReader.Item("账号") 一直显示不存在此列/行的数据
密码.Text = objReader.Item("密码")
确认密码.Text = objReader.Item("密码")
用户名.Text = objReader.Item("用户名")
If objReader.Item("性别") = "男" Then
性别.Items(0).Selected = True
Else
性别.Items(1).Selected = True
End If
Dim I As Integer
For I = 1982 To 1994
出生年.Items.Add(I)
If objReader.Item("出生年") = I Then 出生年.Items(I - 1982).Selected = True
Next
For I = 1 To 12
出生月.Items.Add(I)
If objReader.Item("出生月") = I Then 出生月.Items(I - 1).Selected = True
Next
For I = 1 To 20
出生日.Items.Add(I)
If objReader.Item("出生日") = I Then 出生日.Items(I - 1).Selected = True
Next
电话.Text = objReader.Item("电话")
objReader.Close()
objConn.Close()
End Sub
求解决方法,,急用,谢了