Re: CSV ODBC driver under Windows 2008

2013-08-30 Thread Claude Schnéegans
Ok, I have more information about this problem. In the CSV file, if I replace all semicolons by commas, it works perfectly. The problem is that, either under W 7 or W 2008, it seems that one can set the delimiter and some other format parameters in odbcad32.exe, but they are not saved anywere,

Re: CSV ODBC driver under Windows 2008

2013-08-30 Thread Claude Schnéegans
>>You might try passing delimiter=';' as an additional dsn parameter. BINGO! The problem is that the file Schema.ini is not properly updated by the 32 bit ODBC Administrator. In my W 7 file I see Format=Delimited(;) which is correct, but in the W 2008 file I have Format=CSVDelimited I set Deli

Re: CSV ODBC driver under Windows 2008 (finaly)

2013-08-30 Thread Claude Schnéegans
I finaly found the problem: When you open the ODBC Administrator, you first select the database you want to update, you click on configure, you see the name of your datasource, fine, then you click Options, you still see the name of the datasource you are configuring, then you click Define forma

Re: CSV ODBC driver under Windows 2008

2013-08-30 Thread Byron Mann
You might try passing delimiter=';' as an additional dsn parameter. Which odbc driver are you using in windows? The MS text file driver you can specify an ini file with the delimiter and other parameters. Although I have never tried using that. http://msdn.microsoft.com/en-us/library/windows/des

Re: CSV File Upload. best way?

2009-03-04 Thread Pete Ruckelshaus
You basically have a couple of options (there are obviously many more ways, these are the two approaches that I would take): 1) if it's a small file, just read it into memory and loop through the contents of the file 2) if it's a large file, set up a Microsoft Access database to use an external f

Re: CSV Import - Update with Commas in the Content

2008-10-20 Thread Azadi Saryev
yes, you need to either change your export routine to enclose all 'fields' in double quotes, or change your export format to, say, tab-delimited file instead of comma-delimited. most databases have built-in routines and functions to automate import of data from text files, in which you can usually

re: CSV Import - Update with Commas in the Content

2008-10-20 Thread Ryan Stille
I'm not sure I understand. Are you saying they are providing you data that has delimiters within the data, but the data is not quoted? Like: [EMAIL PROTECTED],Joe,Smith,Joe, John & Sons Inc. If so there is nothing you can do about that, they need to be properly quoting (with double quotes or so

RE: CSV Generation MEMORY SUCK

2008-06-04 Thread Brad Wood
Thanks Larry. ~Brad -Original Message- From: Larry Lyons [mailto:[EMAIL PROTECTED] Sent: Wednesday, June 04, 2008 1:34 PM To: CF-Talk Subject: Re: CSV Generation MEMORY SUCK Here are the results of your code with java.lang.runtime. Forgot to mention that the JVM is 1.5.0_15-b04

Re: CSV Generation MEMORY SUCK

2008-06-04 Thread Larry Lyons
Just ran the same code on Open BlueDragon. NThis test probably is not the equivalent of the previous tests, at home here I'm running this app on a MacBook (core duo 2.16 ghz with 2 gb RAM), running OSX 10.4 Tiger. J2SE 5. But the results are similar: Memory Before: 26 Megs string & string: 5537

Re: CSV Generation MEMORY SUCK

2008-06-04 Thread Larry Lyons
Here are the results of your code with java.lang.runtime. Forgot to mention that the JVM is 1.5.0_15-b04. Memory Before: 28 Megs string & string: 99642ms String Length: 65 Memory After: 91 Megs -- Increase of 63 Megs Memory Before: 29 Megs cfsavecontent: 63ms String Length: 850003 Memory Af

Re: CSV Generation MEMORY SUCK

2008-06-04 Thread Larry Lyons
Here are the results of your code (again BD for J2EE running on JBoss AS 4.22): string & string&: 33251ms String Length: 39 cfsavecontent: 62ms String Length: 570006 I ran the test several times, mainly because the results for cfsavecontent looked so much like an outlier, but I got similar r

RE: CSV Generation MEMORY SUCK

2008-06-04 Thread Brad Wood
That's pretty cool, Larry. I was wondering about BD and Smith. Will J2EE BD let you create the java.lang.runtime object to get memory usage etc? If so, I would be interested in seeing the results of my version of the test which reported the memory increase for each test. (I posted the code yest

Re: CSV Generation MEMORY SUCK

2008-06-04 Thread Larry Lyons
> This whole discussion prompted two blog entries... > > Regarding the javaCSV library: > http://www.opensourcecf. com/1/2008/06/Ja> vaCSV-for-creating-large-CSV-and-other-delmiited-files-with-Coldfusion. > cfm > *or http://tinyurl.com/58o7ox* > ** > Regarding my cfsavecontent performance tests:

RE: CSV Generation MEMORY SUCK

2008-06-04 Thread Brad Wood
1:45 AM To: CF-Talk Subject: RE: CSV Generation MEMORY SUCK (Sorry, I got a little CTRL-Enter happy and sent before I was ready...) Building up strings in cfsavecontent also concatenates to the result variable so the problem is the same. = Hmm, I d

Re: CSV Generation MEMORY SUCK

2008-06-04 Thread Rick Root
This whole discussion prompted two blog entries... Regarding the javaCSV library: http://www.opensourcecf.com/1/2008/06/JavaCSV-for-creating-large-CSV-and-other-delmiited-files-with-Coldfusion.cfm *or http://tinyurl.com/58o7ox* ** Regarding my cfsavecontent performance tests: http://www.opensource

RE: CSV Generation MEMORY SUCK

2008-06-03 Thread Brad Wood
(Sorry, I got a little CTRL-Enter happy and sent before I was ready...) Building up strings in cfsavecontent also concatenates to the result variable so the problem is the same. = Hmm, I don't think you are correct Brian. I just whipped up a test of string concatenat

Re: CSV Generation MEMORY SUCK

2008-06-03 Thread Gerald Guido
Just a 411 I found a nice little tute on generating csv's using the StringBuffer class in ColdFusion http://www.stillnetstudios.com/2007/03/07/java-strings-in-coldfusion/ -- "The important thing in science is not so much to obtain new facts as to discover new ways of thinking about them." - Sir

Re: CSV Generation MEMORY SUCK

2008-06-03 Thread Brian Kotek
Just experience, since I've tried all three options (concatenation, cfsavecontent, and StringBuffer) and have had the first two generate out of memory errors while the StringBuffer worked correctly. So while cfsavecontent may indeed be faster and use less memory, I'm still pretty sure that the Stri

RE: CSV Generation MEMORY SUCK

2008-06-03 Thread Brad Wood
Dang closed source apps-- if only we could just go look at the code! :) ~Brad -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2008 2:26 PM To: CF-Talk Subject: Re: CSV Generation MEMORY SUCK Well, since we're all conducting our own little

Re: CSV Generation MEMORY SUCK

2008-06-03 Thread Rick Root
Well, since we're all conducting our own little tests, here's MY test code: the cfset method took 64 seconds. The cfsavecontent method only takes 203ms. It has GOT to be using a stringbuffer then converting the result to a string at the end. #end-start#ms : #len(result)#

RE: CSV Generation MEMORY SUCK

2008-06-03 Thread Brad Wood
+10=55 For the life of me I can't figure out what the Big-O notation would be for that though... ~Brad -Original Message- From: Gerald Guido [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2008 1:44 PM To: CF-Talk Subject: Re: CSV Generation MEMORY SUCK I did a million loops - I

Re: CSV Generation MEMORY SUCK

2008-06-03 Thread Rick Root
Wow, I just came back to this thread. REALLY makes me wonder how they're handling cfsavecontent! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net

Re: CSV Generation MEMORY SUCK

2008-06-03 Thread Gerald Guido
I did a million loops - I don't know what possessed me to do that. Memory was "measured" using task manager. Totally unscientific. I did a restart on the service before each trial. CF 8 developer 2 gig ram Java v. 1.6.0_01 cfsavecontent 2281 ms 192,356 k start 260,872K after 68.516 k differenc

RE: CSV Generation MEMORY SUCK

2008-06-03 Thread Brad Wood
Ok, here are my memory usage stats on CF 7. Someone please correct me if my code is wrong. It's a little messy, and I apologize for that. Memory Before: 83 Megs string & string: 52795ms String Length: 65 Memory After: 101 Megs -- Increase of 17 Megs Memory Before: 85 Megs cfsavecontent: 172

RE: CSV Generation MEMORY SUCK

2008-06-03 Thread Brad Wood
2008 12:11 PM To: CF-Talk Subject: Re: CSV Generation MEMORY SUCK Did you compare the memory usage by chance? G On Tue, Jun 3, 2008 at 1:07 PM, Brad Wood <[EMAIL PROTECTED]> wrote: ~| Adobe® ColdFusion® 8 software 8 is th

Re: CSV Generation MEMORY SUCK

2008-06-03 Thread Gerald Guido
t is actually a slower server too! > > string & string: 9141ms > String Length: 39 > > cfsavecontent: 31ms > String Length: 39 > > -Original Message- > From: Brad Wood > Sent: Tuesday, June 03, 2008 11:45 AM > To: Brad Wood; 'cf-talk@hou

RE: CSV Generation MEMORY SUCK

2008-06-03 Thread Brad Wood
-Original Message- From: Brad Wood Sent: Tuesday, June 03, 2008 11:45 AM To: Brad Wood; 'cf-talk@houseoffusion.com' Subject: RE: CSV Generation MEMORY SUCK Here are the results: string & string: 17093ms String Length: 39 cfsavecontent: 125ms Str

RE: CSV Generation MEMORY SUCK

2008-06-03 Thread Brad Wood
Hmm, I don't think you are correct Brian. I just whipped up a test of string concatenation. Please spare the "proper load test" flames. This is NOT a load test-- it is intended to make a process run long enough to capture a thread stack. Actually, in the context of large file generations I w

Re: CSV Generation MEMORY SUCK

2008-06-03 Thread Wil Genovese
" where a fair chunk of the CF9 team are hosting a BOF session :-)" That was a fun and ruckus BOF session at CF.Objective()! Wil Genovese ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Ge

RE: CSV Generation MEMORY SUCK

2008-06-03 Thread Brad Wood
Good to know. What is your source of this information? ~Brad From: Brian Kotek [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2008 11:11 AM Building up strings in cfsavecontent also concatenates to the result variable so the problem is the same. On Tue, Jun 3, 2008 at 11:16 AM, Brad Woo

Re: CSV Generation MEMORY SUCK

2008-06-03 Thread Brian Kotek
: Tuesday, June 03, 2008 10:12 AM > To: CF-Talk > Subject: Re: CSV Generation MEMORY SUCK > > Probably because it can't know if that's what you actually want to do. > We > probably need a new function StringAppend or some

Re: CSV Generation MEMORY SUCK

2008-06-03 Thread Tom Chiverton
On Tuesday 03 Jun 2008, Brian Kotek wrote: > Probably because it can't know if that's what you actually want to do. We > probably need a new function StringAppend or something that would be able > to do this. Might be time to hit the wish list! ;-) I'm leaving for Scotch on the Rocks in ~12 hours,

RE: CSV Generation MEMORY SUCK

2008-06-03 Thread Brad Wood
ssage- From: Brian Kotek [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 03, 2008 10:12 AM To: CF-Talk Subject: Re: CSV Generation MEMORY SUCK Probably because it can't know if that's what you actually want to do. We probably need a new function StringAppend or something that would be able to

Re: CSV Generation MEMORY SUCK

2008-06-03 Thread Brian Kotek
Probably because it can't know if that's what you actually want to do. We probably need a new function StringAppend or something that would be able to do this. Might be time to hit the wish list! ;-) On Tue, Jun 3, 2008 at 4:36 AM, Tom Chiverton <[EMAIL PROTECTED]> wrote: > On Monday 02 Jun 2008

Re: CSV Generation MEMORY SUCK

2008-06-03 Thread Tom Chiverton
On Monday 02 Jun 2008, Rick Root wrote: > I found a nice little java class library called JavaCSV that handles all > the file writing and dropped my time from 68 seconds to 18 seconds. That > has potential! Why CF can't translate '&' to a StringBuffer append I'll never know... -- Tom Chiverton

RE: CSV Generation MEMORY SUCK

2008-06-02 Thread Mark Kruger
o: CF-Talk Subject: Re: CSV Generation MEMORY SUCK On Mon, Jun 2, 2008 at 10:50 AM, Gaulin, Mark <[EMAIL PROTECTED]> wrote: > > Also, test you page with the user's query but with the output part > (actually writing the file) commented out... If the page is still slow > an

RE: CSV Generation MEMORY SUCK

2008-06-02 Thread Mark Kruger
From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2008 9:33 AM To: CF-Talk Subject: Re: CSV Generation MEMORY SUCK SQL Server 2005. I'm open to suggestion. This is part of an application that allows users to generate CSV files of their own based on their own criteria, so though I

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Rick Root
On Mon, Jun 2, 2008 at 1:44 PM, Gerald Guido <[EMAIL PROTECTED]> wrote: > >> dropped my time from 68 seconds to 18 seconds > > Nice. Is that entirety of the code sans the query? Entirety. The query itself takes about 4 seconds to execute and return all its data. > >>> little java class librar

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Gerald Guido
>> dropped my time from 68 seconds to 18 seconds Nice. Is that entirety of the code sans the query? >>> little java class library called JavaCSV that handles The the one from SourceForge? I am going to need something like this shortly. G -- "The important thing in science is not so much to

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Rick Root
I found a nice little java class library called JavaCSV that handles all the file writing and dropped my time from 68 seconds to 18 seconds. That has potential! It basically handles the writing of delimiters and the proper csv formatting.. so here's my code:

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Rick Root
On Mon, Jun 2, 2008 at 12:34 PM, Brian Kotek <[EMAIL PROTECTED]> wrote: > The difference is that you have to use the StringBuffer for everything. > Since you aren't passing the StringBuffer into the CSVFormat method and I > don't see the code for that method, I assume it is still suffering from th

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Brian Kotek
No, I opened it and saw that it was 400 lines long and didn't have time to go through it all. But sweeping through it quickly, the same advice applies. The difference is that you have to use the StringBuffer for everything. Since you aren't passing the StringBuffer into the CSVFormat method and I d

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Rick Root
On Mon, Jun 2, 2008 at 11:42 AM, Tom Chiverton <[EMAIL PROTECTED]> wrote: > On Monday 02 Jun 2008, Rick Root wrote: > > generating the csv (around line 330-340 of the sample code I posted > > earlier) took 62 of the 68 seconds. > > Why not output the file all at once, rather than a line at a time

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Rick Root
On Mon, Jun 2, 2008 at 11:40 AM, Gerald Guido <[EMAIL PROTECTED]> wrote: > >> "#Chr(34)##replace(arguments > > > > .str,chr(34),"#chr(34)##chr(34)#","ALL")##Chr(34)#" > > > There is your bottle neck. CF does not like string manipulation on a large > scale. I have tried to parsed large text files b

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Rick Root
Didn't look at the code, eh? On Mon, Jun 2, 2008 at 12:07 PM, Brian Kotek <[EMAIL PROTECTED]> wrote: > Use a Java StringBuffer or StringBuilder. Concatenating large strings in CF > > > On Mon, Jun 2, 2008 at 10:03 AM, Rick Root <[EMAIL PROTECTED]> > wrote: > > > > > http://cfm.pastebin.org/40043

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Brian Kotek
Use a Java StringBuffer or StringBuilder. Concatenating large strings in CF is always a memory hog because every single concatenation creates a new String instance. Check RIAForge, there are CFC libraries that wrap using these Java classes for exactly this purpose. You'll find memory usage drops dr

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Tom Chiverton
On Monday 02 Jun 2008, Rick Root wrote: > generating the csv (around line 330-340 of the sample code I posted > earlier) took 62 of the 68 seconds. Why not output the file all at once, rather than a line at a time (scrap lines ~336 - just keeping .append()'ing to a StringBuffer till your done) ?

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Gerald Guido
>> "#Chr(34)##replace(arguments > > .str,chr(34),"#chr(34)##chr(34)#","ALL")##Chr(34)#" There is your bottle neck. CF does not like string manipulation on a large scale. I have tried to parsed large text files before only to watched my dev box just keel over. I see two options off the top of my

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Rick Root
On Mon, Jun 2, 2008 at 10:50 AM, Gaulin, Mark <[EMAIL PROTECTED]> wrote: > > Also, test you page with the user's query but with the output part > (actually writing the file) commented out... If the page is still slow > and a huge memory hog then the file stuff above won't help much and > you'll ha

RE: CSV Generation MEMORY SUCK

2008-06-02 Thread Gaulin, Mark
ge memory hog then the file stuff above won't help much and you'll have to look at running the query in java too, but I but you'll get something by handling the file better. Thanks Mark -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Monday, June

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Phillip Duba
I know when I had to do this at a previous job I used ArrayAppend to build each line in the CSV, but I see you are using the string buffer. I had no performance diffs at the time, so I just stayed with the CF solution. The one thing I would look at is not using list functions, but instead using Arr

Re: CSV Generation MEMORY SUCK

2008-06-02 Thread Rick Root
SQL Server 2005. I'm open to suggestion. This is part of an application that allows users to generate CSV files of their own based on their own criteria, so though I'm open to "non-CF" solutions, I'm not sure there really would be anyway except maybe a homegrown java class to handle the work and

RE: CSV Generation MEMORY SUCK

2008-06-02 Thread Mark Kruger
Rick, What's your DB platform? Are you sure there is not a better "non-cf" way to do it? Mark A. Kruger, CFG, MCSE (402) 408-3733 ext 105 www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Rick Root [mailto:[EMAIL PROTECTED] Sent: Monday, June 02, 2008

RE: CSV and SQL

2005-06-28 Thread Parker, Kevin
That might do it - I've never done it but I believe you can tell SQL Server to return an XML file so it might be possible - I'll do some more research but thought someone on the list might know the answer off the top of their head. Thanks for the tip ++ Kevin Parker Web Services Co

Re: CSV file and com.Ostermiller.util.ExcelCSVParser

2005-04-07 Thread Victor Moore
Yes, I know and it works except if the empty fields are at the of the line and then not all the time. You can try it yourself. Export your contacts from outlook to a csv file and try to import it using the code that I have posted. You will see that it will complain that certain lines (array returne

Re: CSV file and com.Ostermiller.util.ExcelCSVParser

2005-04-06 Thread Jon Gunnip
Victor, The docs at http://ostermiller.org/utils/doc/com/Ostermiller/util/ExcelCSVParser.html explicitly state that the parser should work as you expect: Empty fields are returned as as String of length zero: "". The following line has three empty fields and three non-empty fields in it. There

Re: CSV file and com.Ostermiller.util.ExcelCSVParser

2005-04-04 Thread Victor Moore
Hi Jon, I'm happy with this utility , except this little problem. Bellow is the code: parser = createObject("java", "com.Ostermiller.util.ExcelCSVParser") ; fileInfo = parser.parse(fileContents) ; noFields = arrayLen (fileInfo); for (i = 2; i lte noFields; i = i + 1) { lineArray = fil

Re: CSV file and com.Ostermiller.util.ExcelCSVParser

2005-04-04 Thread Jon Gunnip
Victor, I'm using the ostermiller CSVWriter, and I am very happy with it. I'm having trouble understanding exactly what your problem is. Can you share some relevant code? Jon On Apr 4, 2005 12:58 PM, Victor Moore <[EMAIL PROTECTED]> wrote: > Actually it's a little bit more complicated than thi

Re: CSV file and com.Ostermiller.util.ExcelCSVParser

2005-04-04 Thread Victor Moore
Actually it's a little bit more complicated than this. The com.Ostermiller.util.ExcelCSVParser utility returns a Java array which is has a Vector type and not the coldfusion array type. Unfortunately (and something that I cannot explain) some lines that have empty fields are not pick up. I need som

RE: CSV file and com.Ostermiller.util.ExcelCSVParser

2005-04-04 Thread Kerry
this will probably be because CF ignores empty list elements. there might be some kind of a split function on cflib.org -Original Message- From: Victor Moore [mailto:[EMAIL PROTECTED] Sent: 04 April 2005 15:14 To: CF-Talk Subject: CSV file and com.Ostermiller.util.ExcelCSVParser I am us

Re: CSV import into DB

2004-10-15 Thread Matt Robertson
I just got done finishing a project that waits around at 15-minute intervals and pulls in 10k+ line csv files for import into a cf db I used Paul Vernon's CFX_pop3 to speed up the processing (*dramatically*) of the 4-5mb file attachments, and Ryan Emerle's new java cfx_text2query to read in the da

Re: CSV import into DB

2004-10-15 Thread Graham Pearson
Sorry, Here is the Code as I attached it before.     cellpadding="0" STYLE="Border-Color: 00; Border-Style: solid; Border-Width: 0px;">        Select File to Upload              method="post" name="UploadForm" enctype="multipart/form-data">

Re: CSV import into DB

2004-10-15 Thread Scott Stroz
You can use xp_cmdshell from the SQL server, or you can also load DTSRun.exe onto the web server(I can't remember how, but it is not difficult to find out how).  DTSRun.exe can reside on any server, and access any other SQL server that allows remote connections. I have written DTS packages that re

Re: CSV import into DB

2004-10-15 Thread Graham Pearson
Here is how I do it through Coldfusion and have not had any problems with it. Basically I ask the user to sleect their file through a Form Object, and The CFFile to Upload this file and then to read the file uploaded. Next I create Objects and Reach each line into an Array. I then have a section

RE: CSV import into DB

2004-10-15 Thread Robertson-Ravo, Neil (RX)
...    _   From: Mark Drew [mailto:[EMAIL PROTECTED] Sent: 15 October 2004 12:33 To: CF-Talk Subject: Re: CSV import into DB My question exactly! Especially since the DB isnt on the same server (as they generally shouldnt be!) MD    _ [Todays Threads] [This Message] [Subscription

RE: CSV import into DB

2004-10-15 Thread Hugo Ahlenius
| From: Scott Stroz [mailto:[EMAIL PROTECTED] | You can use to run DTSRun.exe. Is it possible to run it through t-sql? ### This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange. For more information, connect to http://www.F-Secure.com

Re: CSV import into DB

2004-10-15 Thread Mark Drew
My question exactly! Especially since the DB isnt on the same server (as they generally shouldnt be!) MD [Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Re: CSV import into DB

2004-10-15 Thread Scott Stroz
mailto:[EMAIL PROTECTED] >  | Sent: Friday, October 15, 2004 13:14 >  | To: CF-Talk >  | Subject: RE: CSV import into DB >  | >  | DTS > > >  | >  | >  | >  |    _ >  | >  | From: Mark Drew [mailto:[EMAIL PROTECTED] >  | Sent: 15 October 2004 11:48 >

RE: CSV import into DB

2004-10-15 Thread Hugo Ahlenius
: Friday, October 15, 2004 13:14 | To: CF-Talk | Subject: RE: CSV import into DB | | DTS | | | |    _ | | From: Mark Drew [mailto:[EMAIL PROTECTED] | Sent: 15 October 2004 11:48 | To: CF-Talk | Subject: CSV import into DB | | | | I am doing an automated insert of a CSV file  into a MS SQL database

RE: CSV import into DB

2004-10-15 Thread Robertson-Ravo, Neil (RX)
DTS    _   From: Mark Drew [mailto:[EMAIL PROTECTED] Sent: 15 October 2004 11:48 To: CF-Talk Subject: CSV import into DB I am doing an automated insert of a CSV file  into a MS SQL database. I am sure this has been done a million times, so I was wondering if there is a better way that uploa

Re: CSV import into DB

2004-10-15 Thread Mark Drew
Thanks for that this will not be a one off but a way of populating a table remotely using CSV files via an upload. Seems to me that the SQL language is very limited in the INSERT INTO department. MD On Fri, 15 Oct 2004 12:01:15 +0100, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Mark > > If

RE: CSV import into DB

2004-10-15 Thread kola.oyedeji
Mark If you have Enterprise manager (and this is a one off task) you can run the dts wizard which allows you to Insert data into and from CSV, excels and numerous other file formats. HTH Kola   _   From: Mark Drew [mailto:[EMAIL PROTECTED] Sent: 15 October 2004 10:48 To: CF-Talk Subject

Re: .csv import for CFHTTP but not CFFILE?

2004-10-06 Thread Al Everett
You could also try the QueryToCsv UDF. http://cflib.org/udf.cfm?ID=556 --- Ryan Emerle <[EMAIL PROTECTED]> wrote: > Check out: > http://www.emerle.net/programming/display.cfm/t/cfx_text2query > (it's free) > > "CFX_Text2Query works better than other methods because it can handle > empty fields

Re: .csv import for CFHTTP but not CFFILE?

2004-09-30 Thread Ryan Emerle
Check out: http://www.emerle.net/programming/display.cfm/t/cfx_text2query (it's free) "CFX_Text2Query works better than other methods because it can handle empty fields and fields with line breaks.." "One alternative, using CFHTTP, requires the file to be web-accessible, and cannot handle empty f

Re: .csv import for CFHTTP but not CFFILE?

2004-09-29 Thread Barney Boisvert
You're 100% correct that it's totally backwards and foolish that it's possible to only convert a CSV to a recordset from remote resources. It is totally unclear why MM hasn't exposed that as standalone functionality, but it's been that was since the dawn of time with no change. cheers, barneyb O

Re: CSV to Query

2004-08-25 Thread Bert Dawson
heers 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

Re: CSV to Query

2004-08-25 Thread Dick Applebaum
Oops, forgot to send this! Dick That looks like a date time field. I never thought much about it, but I don't think that cfhttp can determine that the field is a datetime -- I think it simply creates a char  field. So, you can't do a QofQ on a datetime value as only text comparisons are vali

Re: CSV to Query

2004-08-25 Thread Barney Boisvert
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 fo

Re: CSV to Query

2004-08-25 Thread Mark Drew
The file is something like Part,PartDesc,OrderRef,Qty,orderdate XX,A descriptoin of an Item,OrderRefno222,1,14/05/2004 15:20 you get the idea It is the date that kills me! MD On Wed, 25 Aug 2004 10:20:29 -0400, Marc Campeau <[EMAIL PROTECTED]> wrote: > > > > Anybody have a UDF for this? I n

Re: CSV to Query

2004-08-25 Thread Marc Campeau
> > > 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 a

Re: CSV to Query

2004-08-25 Thread Dick Applebaum
Can we see a few lines of your CSV file? Dick On Aug 25, 2004, at 7:03 AM, Mark Drew wrote: > I have looked at this.. there is one small problem > >  one of the columns is a date so I am not sure how dbtype= query >  handles it but the results seem a bit odd > >   > textqualifier=""> > >   >  SE

Re: CSV to Query

2004-08-25 Thread Mark Drew
I have looked at this.. there is one small problem one of the columns is a date so I am not sure how dbtype= query handles it but the results seem a bit odd SELECT * FROM info WHERE orderdate < value="#DateFormat(Now(), "dd/mm/")#"> On Wed, 25 Aug 2004 06:35:57 -0700, Dick Applebaum <[E

Re: CSV to Query

2004-08-25 Thread Dick Applebaum
Have a look at cfhttp HTH Dick On Aug 25, 2004, at 5:56 AM, Mark Drew wrote: > Anybody have a UDF for this? I need it sharpish, I can write it myself >  but if someone else has done this.. whooho! > >  Much apreciated > >  -- >  Mark Drew >  mailto:[EMAIL PROTECTED] >  blog:http://cybersonic.bl

Re: CSV to Query

2004-08-25 Thread simon
I don't know if there's anything on cflib.org, but if you have access to DRK3, the DFA API does this (and a ton more). ~Simon Simon Horwith CTO, eTRILOGY ltd. Member of Team Macromedia Macromedia Certified Master Instructor Blog - http://www.horwith.com > > Anybody have a UDF for this? I need

RE: CSV HELL

2004-06-22 Thread Matthew Walker
This function will parse a single line of Excel CSV if that's any use to you.

Re: CSV HELL

2004-06-22 Thread Rizal Firmansyah
Rich, i have a custom tag to parse CSV files. Perhaps you can give it a shot: http://www.cftagstore.com/tags/csv2query.cfm Try the example here: http://www.masrizal.com/product/custom%20tag/csv2query/docs%20%26%20examples/csv2query_example.cfm Copy paste your CSV files into the textarea, and see

RE: CSV HELL

2004-06-22 Thread Barney Boisvert
to:[EMAIL PROTECTED] > Sent: Tuesday, June 22, 2004 10:29 AM > To: CF-Talk > Subject: Re: CSV HELL > > Barney Boisvert wrote: > > > There's a really nice set of utility classes available at > > http://www.ostermiller.org/utils/CSV.html that I've used >

Re: CSV HELL

2004-06-22 Thread Rick Root
Barney Boisvert wrote: > There's a really nice set of utility classes available at > http://www.ostermiller.org/utils/CSV.html that I've used with great success > for parsing CSV files.  It takes care of all the nastiness with quotes in > Excel CSV files.  It also has classes for handling "normal"

RE: CSV HELL

2004-06-22 Thread Barney Boisvert
es. Little more work than dropping in a UDF, but it's blazing fast. Cheers, barneyb > -Original Message- > From: Pascal Peters [mailto:[EMAIL PROTECTED] > Sent: Tuesday, June 22, 2004 6:29 AM > To: CF-Talk > Subject: RE: CSV HELL > > This is the regexp hell. There

RE: CSV HELL

2004-06-22 Thread Pascal Peters
This is the regexp hell. There is no error handling for wrong csv. It also doesn't handle CR/LF in a quoted value. It's MX, but with some minor modifications it should work on CF5. But hey, I only had 20' to write it. I think you can use cfhttp to do it too. Pascal a,b,c This is red, "This is s

RE: CSV HELL

2004-06-22 Thread Semrau Steven Ctr SAF/IE
Can you have the CSV created using the pipe ( | ) or double pipes as the separator instead of the comma?  Then just define the pipe symbol as the delimiter for listGetAt(). HTH -Original Message- From: Rich Ziade [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 22, 2004 8:15 AM To: CF-Talk S

RE: CSV File Format Specification

2004-05-27 Thread Alistair Davidson
Hi Brook, There isn't really a proper standard for CSV files, it's not like a JPEG or MP3 or anything. But, having said that, I've never seen a CSV file with text-qualified fieldnames. And the text qualifier should only be used on text-format fields - unless the ID maps to a DB field that is in

RE: CSV File Format Specification

2004-05-26 Thread Barney Boisvert
I believe you only have to text-qualify strings that contain commas or newlines, but that text-qualifying extra fields is acceptable.  If you check out http://ostermiller.org/utils/CSV.html there's a little java library that deals with CSV files, both excel-generated and 'normal'.  We've used it wi

RE: CSV Upload Note

2003-06-27 Thread Andy Ousterhout
PROTECTED] Sent: Friday, June 27, 2003 5:23 PM To: CF-Talk Subject: Re: CSV Upload Note If you were using a the correct custom delimiter for your file ...that's quite a bug, and quite incredible that it has gone undetected for all these years. If you left the DSN on the default of CSV del

Re: CSV Upload Note

2003-06-27 Thread jon hall
If you were using a the correct custom delimiter for your file ...that's quite a bug, and quite incredible that it has gone undetected for all these years. If you left the DSN on the default of CSV delimited...expect crazy things like that to happen, because the example you give is _not_ a valid c

Re: CSV Question

2003-06-27 Thread jonhall
onnectivity info. AO> What am I doing wrong? I've assigned User being System, and I don't have AO> passwords on this test box. AO> -Original Message- AO> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] AO> Sent: Thursday, June 26, 2003 10:55 PM AO> To: CF-Ta

RE: CSV Question

2003-06-26 Thread Andy Ousterhout
ds on this test box. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 26, 2003 10:55 PM To: CF-Talk Subject: Re: CSV Question Forgive the asp site...but it's got screenshots :) http://www.c-sharpcorner.com/database/Connect/ConnectODBCText.asp

Re: CSV Question

2003-06-26 Thread jonhall
Forgive the asp site...but it's got screenshots :) http://www.c-sharpcorner.com/database/Connect/ConnectODBCText.asp A couple things to add to what the above site says. An ini file (schema.ini in example) will be created in the same directory as the csv after the dsn is created. Take a look at it

RE: csv files

2003-06-06 Thread Costas Piliotis
al Message- From: Tony Schreiber [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 12:44 PM To: CF-Talk Subject: RE: csv files However, do NOT do that for very large (50,000+ records) reports. Write each line at a time. It may be counter-intuitive, but apparently, appending data to a

RE: csv files

2003-06-06 Thread Barney Boisvert
nal Message- > From: Tony Schreiber [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 12:44 PM > To: CF-Talk > Subject: RE: csv files > > > However, do NOT do that for very large (50,000+ records) reports. Write > each line at a time. It may be counter-intuitive,

  1   2   >