Hi,
I meant using or adapting the code from opennetcf.org , I know it's not
trivial :)
I believe your selected path is not the best approach, just use one of the
already in existence solutions.
--
--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"kevin" <kevin@discussions.microsoft.com> wrote in message
news:BB11591C-830E-4BBB-AB0C-F76F27D15E61@microsoft.com...[color=blue][color=green][color=darkred]
>>>This should be fairly trivial[/color][/color]
>
> Thats a bit of an overstatement, isn't it. I found a project on
> CodeProject.com and that project is anything but trivial... not
> overwhelming,
> but involved.
>
>
http://www.thecodeproject.com/cs/dat...select=1499295
>
> I actually decided to go with the regex solution. I'll first use split
> and
> if that returns and array with an incorrect size (I will know the number
> of
> fields), then I'll use the regex expression.
>
> Thanks for the input
>
>
> --
> kevin...
>
>
> "Ignacio Machin ( .NET/ C# MVP )" wrote:
>[color=green]
>> Hi Kevin,
>>
>> Take a look at opennetcf.org they provide a CSV parser, has you will have
>> the code you can change (dont remember if this feature is present or not)
>> the code to instead of "," use any other character you want.
>>
>> This should be fairly trivial
>>
>>
>> --
>> --
>> Ignacio Machin,
>> ignacio.machin AT dot.state.fl.us
>> Florida Department Of Transportation
>>
>> "kevin" <kevin@discussions.microsoft.com> wrote in message
>> news:25E18B60-E631-4AF9-8FD9-383CDAD2F76F@microsoft.com...[color=darkred]
>> >I need to parse an third party supplied delimited or fixed width text
>> >file
>> > into a datatable. The delimiter may vary.
>> >
>> > I am currently using a SteamReader to read each line and, for delimited
>> > files, String.Split() to break each line into an array based on the
>> > delimiter. The problem, as you may guess, is that the delimiter
>> > character
>> > is
>> > being used in the data
>> >
>> > i.e. "Kevin","Williams,"I like commas, I really do"
>> >
>> > In the above I get an array with 4 elements and not 3 when the
>> > delimiter
>> > is
>> > a comma.
>> >
>> > My next stop is the Jet OLEDB provider, which expects CSV by default
>> > and
>> > which I understand will handle other delimiters with a Schema.ini file.
>> > Seems easy enough...
>> >
>> > QUESTION:
>> > Is there a better way than Jet or some .Net class that I am
>> > overlooking?
>> >
>> > --
>> > kevin...[/color]
>>
>>
>>[/color][/color]