Question abour reading file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Eric Caron

    Question abour reading file

    Hi

    Here's my question, I have to read a CSV file and import data in
    DataSet. How I can do this in VB.NET ?

    Is it possible to have import method to import file directly in
    dataset ?

    Thanks
  • William Ryan

    #2
    Re: Question abour reading file

    Eric:

    This should help, but the short answer is Yes, you can do it.



    HTH,

    Bill
    "Eric Caron" <ecaron@pgsyste m.com> wrote in message
    news:rmcgnvg5gs 9c9vf7qifc5do2m urai3n08s@4ax.c om...[color=blue]
    > Hi
    >
    > Here's my question, I have to read a CSV file and import data in
    > DataSet. How I can do this in VB.NET ?
    >
    > Is it possible to have import method to import file directly in
    > dataset ?
    >
    > Thanks[/color]


    Comment

    • Dino Chiesa [Microsoft]

      #3
      Re: Question abour reading file

      A dataset can slurp in an XML file. If the file is properly formatted.

      Also, There are utils and code samples roaming the net that can convert CSV
      to XML.

      Might be easier to just use a StreamReader to read the CSV file and do your
      own population of the DataSet. Probably 35-40 lines of code.

      -Dino


      "Eric Caron" <ecaron@pgsyste m.com> wrote in message
      news:rmcgnvg5gs 9c9vf7qifc5do2m urai3n08s@4ax.c om...[color=blue]
      > Hi
      >
      > Here's my question, I have to read a CSV file and import data in
      > DataSet. How I can do this in VB.NET ?
      >
      > Is it possible to have import method to import file directly in
      > dataset ?
      >
      > Thanks[/color]


      Comment

      Working...