You can use the CFHTTP tag and point it at a text file.
You tell it certain delimiters, and point it at the file and it
transforms a (for example purposes) comme delimited
file into a query automatically for you. Or you can
use... excel, access etc. but the CFHTTP solution is
something that can be done programmatically IF
the files are delimited :)
Jeremy
----- Original Message -----
From: Ric Smith <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 05, 2000 4:32 PM
Subject: Re: Importing of ASCII Files
What type of DB? If you're using access you can just do
an import specifying the delimiter, etc.
If you want to do it in CF I believe this will be the direction
to go:
1. read whole file into variable using cffile.
2. loop through var spliting at Chr(13) (newline).
3. spliting that line by whatever your delimiter is.
4. assign each value to a var to use in your insert query.
Or something along those lines.
Ric Smith
----- Original Message -----
From: "Randy Adkins" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 05, 2000 11:52 AM
Subject: Importing of ASCII Files
> If there any way to import a standard ASCII text file into
> a DB using CF?
>
> I can read the file using the CFFILE function but the
> variable is smash together where the text file is set as
> predetermined spaces and lengths of field data.
>
> I can possible using CFFILE and increment the counter
> of characters to read each time but I know there should
> be an easier way.
>
> Thanks.
>
>
>
> --------------------------------------------------------------------------
----
> Archives: http://www.mail-archive.com/[email protected]/
> To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
----------------------------------------------------------------------------
--
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.