I'm not really sure what you mean but... this is somthing i use to put call items from a MSDB, if you can pull something from this and solve your problem then you are welcome to it :)
Public Structure NewsItems
Dim Title As String
Dim Messege As String
Dim DateNews As String
End Structure
Public Shared Function Function_NewsItems( _
ByRef Requested As String) As NewsItems
Dim DBConn As New OleDbConnection(ProviderJet4 + _
System.Web.HttpContext.Current.Server.MapPath( _
"../App_Data/NewsNotice.mdb"))
Dim DBQueryStr As New StringBuilder
DBQueryStr.Append("SELECT TOP " + Requested + _
" ID, NewsDate, NewsTitle, NewsMessage ")
DBQueryStr.Append("FROM GlobalNews ")
DBQueryStr.Append("ORDER BY ID DESC ")
Dim Get_NewsItems As NewsItems
Dim RawDate As Date
Get_NewsItems.DateNews = Nothing
Get_NewsItems.Messege = Nothing
Get_NewsItems.Title = Nothing
Dim DBCommQuery As String = DBQueryStr.ToString
Try
DBConn.Open()
Dim DBComm As New OleDbCommand(DBCommQuery, DBConn)
Dim DBReader As OleDbDataReader = DBComm.ExecuteReader()
While DBReader.Read()
RawDate = DBReader.Item(1)
Get_NewsItems.Title = DBReader.Item(2)
Get_NewsItems.Messege = DBReader.Item(3)
Get_NewsItems.DateNews = RawDate.ToString("dd'" + _
DayDateSuffix(RawDate.Day) + "' MMMM yyyy")
End While
DBConn.Close()
Catch ex As Exception
Finally
DBConn.Dispose()
End Try
Return Get_NewsItems
End Function
Once this function has run you can simply use somthing like this...
Dim Output1 = App_Static.Function_NewsItems("1")
Me.SBL_News_Literal_TextBox.Text = Output1.Title + _
vbNewLine + _
Output1.Messege + _
vbNewLine + _
Output1.DateNews
Remember this is somthing from one of my own projects and is just a pointer.
Good Luck.