3/Third way: use CFHTTP to turn the file into a query and make a SQL statement to copy
the data into your database
4/Fourth way: use CFEXECUTE to call a Perl script
5/Pull the data straight from Excel as an ODBC datasource
We've used both methods 3 & 4. The Perl script is by far faster, more reliable, and
less load on the database and CF server.
At 02:51 PM 2/16/01 +0000, Daniel Lancelot wrote:
>(at least) 2 ways of doing this...
>
>1/ Use cffile and lsit functions in cf to import line by line - inefficient
>and slow if you are importing a large ammount of data.
>
>2/ Create a dts package in sqlserver and set it up as an automated process
>(or use cfexecute and dtsrun) in sqlserver.
>
>If doing 2/ then make sure the paths you set up for import from can be
>resolved on the server (the paths are set up as relative to the local copy
>of enterprise manager - so it is sometimes neccessarry to set it up in EM
>directly on the live box ...
>
>HTH - if you have any more questions just ask...
>
>-----Original Message-----
>From: Paul Sinclair [mailto:[EMAIL PROTECTED]]
>Sent: 16 February 2001 14:41
>To: CF-Talk
>Subject: Tag or function to import csv file to db
>
>
>I've been trying to figure out a method to suck the contents of a comma
>delimited text file into a SQL database on an automated basis. Is there some
>method of doing this via CF? I've looked in the devex for a tag but don't
>see any.
>
>I'm getting a text file every night from an offsite source and each morning
>I am manually importing the data to the db. I'm sure that CF can do this via
>a cfm template that is run as a scheduled task but I haven't figured out how
>to do it.
>
>Thanks for any help.
>
>Paul Sinclair
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists