[howto] Create string array from column in dataset

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

    #1

    [howto] Create string array from column in dataset

    Hi guys,

    I was wondering how I would go about creating a string array from a
    single column from a dataset. What I was thinking was iterate through
    each row in the dataset, finding out the size and create a string
    array, and then foreach row in the dataset populate the string array
    one item at a time.

    The reason for this is because I have a dataset in C# and I am
    returning this through a webservice to a MS Word Document (which is
    VB6.0/VBA) that does not support datasets. Do you guys have any other
    ideas? I appreciate your time and effort.

    Thanks in Advance,
    Steve
  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: [howto] Create string array from column in dataset

    Steve,

    What you are doing is ok. You could also just have your web service
    return a string, and then output the XML from the dataset as the return
    value. Then in the word document, you would parse the XML and get your
    values.

    Hope this helps.

    i
    "STeve" <schow@symcor.c om> wrote in message
    news:531128b2.0 310221113.67205 6e6@posting.goo gle.com...[color=blue]
    > Hi guys,
    >
    > I was wondering how I would go about creating a string array from a
    > single column from a dataset. What I was thinking was iterate through
    > each row in the dataset, finding out the size and create a string
    > array, and then foreach row in the dataset populate the string array
    > one item at a time.
    >
    > The reason for this is because I have a dataset in C# and I am
    > returning this through a webservice to a MS Word Document (which is
    > VB6.0/VBA) that does not support datasets. Do you guys have any other
    > ideas? I appreciate your time and effort.
    >
    > Thanks in Advance,
    > Steve[/color]


    Comment

    Working...