Putting Raw formatted Data in proper datatype and displaying

Discussion in 'ASP .Net' started by jty202, Jan 17, 2005.

  1. jty202

    jty202 Guest

    I have raw formated data (comma separated), and I like to store it in a good
    datatype/collection object. And display the data in the data object in a
    HTML table.


    The data looks like this:

    Date,XYZ,PEAK,Price,Number,Volume
    14-Jan-05,ABC,123,26.04,26.12,92180800
    13-Jan-05,ABC,123,26.04,26.12,92180800
    12-Jan-05,ABC,123,26.04,26.12,92180800
    11-Jan-05,ABC,123,26.04,26.12,92180800




    Thanks in advance
     
    jty202, Jan 17, 2005
    #1
    1. Advertisements

  2. What is your exact question? Are in looking for answers about how to parse
    the data, create custom collections, render the content as HTML, or
    something else?
     
    Peter Rilling, Jan 17, 2005
    #2
    1. Advertisements

  3. jty202

    jty202 Guest

    What is a good way to read these data into a data collection or data object
    (recordset?)

    What is a good way to diaplay the data from the data collection or data
    object ( recordset?) in to HTML Table (a binded table?)?
     
    jty202, Jan 18, 2005
    #3
  4. jty202

    Guest Guest

    You can put them as an array by using string.split
     
    Guest, Jan 18, 2005
    #4
  5. jty202

    Cor Ligthert Guest

    JTY,

    A recordset is set of records in ADODB I don't believe you want that.

    When your data is a file than you can use this when it is in VBNet code.

    \\\
    Private Sub Form1_Load(ByVal sender As Object, _
    ByVal e As System.EventArgs) Handles MyBase.Load
    Dim file As String = "Test2.txt"
    Dim path As String = "C:\Test1\"
    Dim ds As New DataSet
    Try
    Dim f As System.IO.File
    If f.Exists(path & file) Then
    Dim ConStr As String = _
    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
    path & ";Extended Properties=""Text;HDR=No;FMT=Delimited\"""
    Dim conn As New OleDb.OleDbConnection(ConStr)
    Dim da As New OleDb.OleDbDataAdapter("Select * from " & _
    file, conn)
    da.Fill(ds, "TextFile")
    End If
    Catch ex As Exception
    MessageBox.Show(ex.ToString)
    End Try
    End Sub
    ///

    See for an answer on you datetime question your later sent message.

    I hope this helps a little bit?

    Cor
     
    Cor Ligthert, Jan 18, 2005
    #5
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.