hello,
I need to apply a function to some data before they are displayed in a dropdownlist. A solution could be to loop through the datareader and apply the function there but I don't know how to define the parameter for the funtion.
I need to apply a function to some data before they are displayed in a dropdownlist. A solution could be to loop through the datareader and apply the function there but I don't know how to define the parameter for the funtion.
Code:
Sub BindArchive()
dim myConnection as new OleDBConnection ("Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=C:\inetpub\[URL unfurl="true"]wwwroot\new1\blog.mdb")[/URL]
dim objCmd_archive as OleDbCommand = new OleDbCommand ("Query1", myConnection)
objCmd_archive.CommandType = CommandType.StoredProcedure
myConnection.Open()
cbo_archive.DataSource= objCmd_archive.ExecuteReader()
while cbo_archive.DataSource.read()
convertDate()
end while
cbo_archive.DataBind()
myConnection.Close()
End Sub
Private function ConvertDate(mes_monthyear as string) as string
mes_monthyear = InStr(1, mes_monthyear, " ", CompareMethod.Text)
return mes_monthyear
End function