VB.Net中的一段代码,对这个历程不太了解,希望各位路过的朋友们给解释解释

VB.Net中的一段代码,对这个过程不太了解,希望各位路过的朋友们给解释解释
[code=text] '定义要执行的SQL语句
        Dim sqlStr As String = "update User_Info set PWD=@PWD where UserID=@UserID"
        Dim connStr As New SqlConnection(PConnStr.connstr())
        '创建Command对象
        Dim cmd As New SqlCommand(sqlStr, connStr)
        cmd.Parameters.Add(New SqlParameter("@PWD", PUserId.PWD))
        cmd.Parameters.Add(New SqlParameter("@UserID", PUserId.UserID))

        Try
            connStr.Open()
            Return cmd.ExecuteNonQuery > 0       '操作成功
        Catch ex As Exception
            Return False            '如果操作不成功的话返回False
        Finally
            If Not IsNothing(cmd) Then
                cmd.Dispose()
                cmd = Nothing
            End If

            If Not IsNothing(connStr) Then
                connStr.Close()
                connStr = Nothing
            End If
        End Try
[/code]


------解决方案--------------------
这段代码就是更新数据库里的一条记录
------解决方案--------------------
连接
更新
关闭
------解决方案--------------------
楼上正解,就是修改User_Info表里面用户的密码。VB语句和C#差距不大,看得懂C#基本上这个就完全没问题。