And 

3/ Set up a schema.ini file in the directory where your text  file will be,
set up a text file datasource, and treat it like a read-only DSN

-----Original Message-----
From: Daniel Lancelot [mailto:[EMAIL PROTECTED]]
Sent: 16 February 2001 14:51
To: CF-Talk
Subject: RE: Tag or function to import csv file to db


(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/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to