Public Function upd(ByVal id As Integer, ByVal i As Integer) As Integer
With conn
If .State = ConnectionState.Open Then .Close()
.Open()
End With
sql = "UPDATE nums2 SET week = '" & i & "' WHERE id='" & id & "' "
cmd = New SqlCommand(sql, conn)
Dim r As Integer = cmd.ExecuteNonQuery()
conn.Close()
Return 2
End Function