'-----------------------------------
'此类抽象是音乐的基本分类
'----------------------------------
Public Class MusicType
Public Property class_Title() As String
Get
Return Me.class_Title
End Get
Set(ByVal Value As String)
Me.class_Title = Value
End Set
End Property
Public Property class_ID() As Integer
Get
Return Me.class_ID
End Get
Set(ByVal Value As Integer)
Me.class_ID = Value
End Set
End Property
'----------------------------------------------
'获取音乐的所有分类
'--------------------------------------------
Public Shared Function GetMusicAllType() As ArrayList
Dim muiscClassList As ArrayList = New ArrayList(20)
Dim conn As OleDbConnection = DbConn.CreateConn()
Dim strSql As String = "select * from musictype"
Dim command As OleDbCommand = New OleDbCommand(strSql, conn)
Dim dataReader As OleDbDataReader
dataReader = command.ExecuteReader()
While dataReader.Read()
Dim curMuiscClass As MusicType = New MusicType
curMuiscClass.class_ID = dataReader.GetInt32(0) /**********
curMuiscClass.class_Title = dataReader.GetString(1) /**********
muiscClassList.Add(curMuiscClass)
End While
dataReader.Close()
conn.Close()
End Function
End Class
设置断点 得到 下面信息
class_ID <error: an exception of type: {System.StackOverflowException} occurred> Integer
class_Title <error: an exception of type: {System.StackOverflowException} occurred> String
'此类抽象是音乐的基本分类
'----------------------------------
Public Class MusicType
Public Property class_Title() As String
Get
Return Me.class_Title
End Get
Set(ByVal Value As String)
Me.class_Title = Value
End Set
End Property
Public Property class_ID() As Integer
Get
Return Me.class_ID
End Get
Set(ByVal Value As Integer)
Me.class_ID = Value
End Set
End Property
'----------------------------------------------
'获取音乐的所有分类
'--------------------------------------------
Public Shared Function GetMusicAllType() As ArrayList
Dim muiscClassList As ArrayList = New ArrayList(20)
Dim conn As OleDbConnection = DbConn.CreateConn()
Dim strSql As String = "select * from musictype"
Dim command As OleDbCommand = New OleDbCommand(strSql, conn)
Dim dataReader As OleDbDataReader
dataReader = command.ExecuteReader()
While dataReader.Read()
Dim curMuiscClass As MusicType = New MusicType
curMuiscClass.class_ID = dataReader.GetInt32(0) /**********
curMuiscClass.class_Title = dataReader.GetString(1) /**********
muiscClassList.Add(curMuiscClass)
End While
dataReader.Close()
conn.Close()
End Function
End Class
设置断点 得到 下面信息
class_ID <error: an exception of type: {System.StackOverflowException} occurred> Integer
class_Title <error: an exception of type: {System.StackOverflowException} occurred> String
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货