Both do pretty much the same thing - take some formatted text and return a recordset.
As to which to use, its much of a muchness - I think the UDF is slightly faster until the amount of data being passed in reaches a certain size, after which performance deteriorates faster than the tag, but I haven't looked at either for years, so that would have been testing on CF5
Cheers
Bert
________________________________
From: Barney Boisvert [mailto:[EMAIL PROTECTED]
Sent: 25 August 2004 17:14
To: CF-Talk
Subject: Re: CSV to Query
Here's a second vote for ostermiller's CSV parser. It's java, so it
requires a touch of Java knowlesge, but it's very easy to use, as
Marc's demo illustrates, and quite fast.
cheers,
barneyb
On Wed, 25 Aug 2004 10:20:29 -0400, Marc Campeau <[EMAIL PROTECTED]> wrote:
> > > > Anybody have a UDF for this? I need it sharpish, I can write it myself
> > > > but if someone else has done this.. whooho!
>
> I use a Java library (ExcelCSVParser) from www.Ostermiller.com. You
> can find some other great utils there too.
>
> This is the code I use to parse a CSV file... it creates an array not
> a query though.
> <!--- Convert CVS file to matrix(java.lang.String[][]) for easier
> manipulation --->
> <cflock timeout="10" throwontimeout="Yes" name="ImportTasks" type="EXCLUSIVE">
> <cfscript>
> f = createObject( "java", "java.io.FileInputStream" );
> f.init("#REQUEST.DOCUMENT_DIRECTORY#\#File.ServerFile#");
>
> parser = createObject( "java", "com.Ostermiller.util.ExcelCSVParser" );
> parser.init( f );
> csvArr = parser.getAllValues();
> parser.close();
> f.close();
> </cfscript>
> </cflock>
>
> --
--
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com
________________________________
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

