Sorry, I just realized I understood the question backwards. What I did
below will get the data from a text file to a database. However, I've also
seen a case where the contents of cfhttp were used to enter data into a text
file as follows:
<cffile action="WRITE" file="full_path_name.txt"
output="#CFHTTP.FileContent#">
Since the cfhttp is a query of sorts, I wonder if you can't do something
similar with a regular query.
Marianne Daye
-----Original Message-----
From: Daye, Marianne [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 03, 2001 7:45 AM
To: CF-Community
Subject: RE: How we could get data from database to text file
<CFHTTP> seems to read a delimited file into a query and use the column
headers as field names. This has worked for me:
<cfhttp URL="http://localhost/path/file.htm method="GET"
name="MyQuery"
textqualifier=""""
delimiter=",">
<!--- Update database table with file contents. --->
<cfloop query="MyQuery">
<cfquery datasource="#DataSource#">
UPDATE MyTable
SET Field1 = '#Col1#',
Field2 = '#Col2#'
</cfquery>
</cfloop>
Marianne Daye
Programmer/Analyst
Information Delivery Systems (IDS)
http://ids.rti.org
-----Original Message-----
From: Derek Hamilton [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 03, 2001 3:04 AM
To: CF-Community
Subject: Re: How we could get data from database to text file
Some more info on what/how you are trying to do would be helpful.
Derek
----- Original Message -----
From: "Eyad Makhoul" <[EMAIL PROTECTED]>
To: "CF-Community" <[EMAIL PROTECTED]>
Sent: Monday, April 02, 2001 11:47 PM
Subject: How we could get data from database to text file
> Dear all..,
> I face a problem in how to get data from database to a text file
> through coldfusion ...and i used CFFILE but it seems it does not
> perform the job perfectly, because i want the data with thier
> columns to be inserted in to file.
>
> any Help...?
>
>
>
> MR.Eyad Makhoul
> TelNo/Home:+96265359801
> Mobile:+96277304797
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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