Thanks Brian
I tried it - but it doesn't seem to work in this section of code ....
Public Sub BuildArrayList(ByVal blankLine As Boolean, ByVal oraConnectionStr As String, ByVal sqlStr As String _
, ByVal vDropDownList As DropDownList, ByVal listValue As String)
' attempt to pass in and return the ListItem Object itself
Dim newArrayList As New ArrayList()
Dim newArrayListValue As New ArrayList()
' Dim newArrayList As MyArrayList
Dim createArrayException As Exception
Dim createArrayListCommand As New OleDb.OleDbCommand()
Dim oraConnection As New OleDb.OleDbConnection()
Dim arrayListDataReader As OleDb.OleDbDataReader
Try
'Get the Oracle connection string.
oraConnection.ConnectionString = oraConnectionStr
createArrayListCommand.Connection = oraConnection
'Open the Oracle connection.
oraConnection.Open()
'Build the Status LOV from a SQL statement.
createArrayListCommand.CommandText = sqlStr
createArrayListCommand.CommandType = CommandType.Text
vDropDownList.Items.Add(""
arrayListDataReader = createArrayListCommand.ExecuteReader()
vDropDownList.DataSource = arrayListDataReader
vDropDownList.DataTextField = "code_desc"
vDropDownList.DataValueField = "code"
vDropDownList.DataBind()
vDropDownList.Items.FindByValue(listValue).Selected = True
arrayListDataReader.Close()
Catch createarrayException
exceptionMessageStr = createArrayException.Message.ToString()
Finally
'Close the Oracle connection.
oraConnection.Close()
End Try
End Sub