S
Steve
I have to create 2 strings and then parse one string out to save the data
into the database.
My first string looks like this:
John|Smith|[email protected],Greg|Henry|[email protected],Kelly|Smith|[email protected],
I then need to parse out that string to seperate them by the commas so I see
this
John|Smith|[email protected]
Greg|Henry|[email protected]
Kelly|Smith|[email protected]
I then need to parse out that string so I get
John
Greg
Kelly
Smith
Henry
Smith
so I can save each value to the database, what is the best way to do this?
The stored procedure I'm calling is already parsing strings by the comma, so
would it be easier to just parse out the large string in code and pass the
smaller string with the pipe (|) and make a change to the proc to parse the
values by the (|) or should I do all of this in my C# code? If the C# way,
how would that be done? I'm able to get this string format
(John|Smith|[email protected]) but when I try to parse it out, I' get errors
(Index was outside the bounds of the array)
into the database.
My first string looks like this:
John|Smith|[email protected],Greg|Henry|[email protected],Kelly|Smith|[email protected],
I then need to parse out that string to seperate them by the commas so I see
this
John|Smith|[email protected]
Greg|Henry|[email protected]
Kelly|Smith|[email protected]
I then need to parse out that string so I get
John
Greg
Kelly
Smith
Henry
Smith
so I can save each value to the database, what is the best way to do this?
The stored procedure I'm calling is already parsing strings by the comma, so
would it be easier to just parse out the large string in code and pass the
smaller string with the pipe (|) and make a change to the proc to parse the
values by the (|) or should I do all of this in my C# code? If the C# way,
how would that be done? I'm able to get this string format
(John|Smith|[email protected]) but when I try to parse it out, I' get errors
(Index was outside the bounds of the array)