Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

importing text files

Status
Not open for further replies.

DotNetDunce

Programmer
Aug 23, 2001
47
US
I'm pretty new at this. Is it possible to use ColdFusion to import a text file into Access 2000? If so, can someone point me to an example or tell me where to start?

Thanks.
 
One thing you can do is use the textfile as a datasource. With CFHTTP you can use a textfile as datasource. Just provide a name (this will be the query name), a delimiter for the columns, a textqualifier which indicated where one row starts and ends, and the names of the columns in a comma-delimted list. Also make sure you set the method to "GET". Once you have your recordset, do an insert on your access DB for each row by doing a CFOUTPUT QUERY. Hope this will help you get started.

<webguru>iqof188</webguru>
 
This has been wonderful help. Thank you very much. I have one more problem. I've managed to use cfhttp to get my data and have successfully inserted it into the access table, but it's skipping the first record. Any clues as to why?

Thanks again!
 
Nevermind......I found out why. CFHTTP ignores the first line if the file doesn't contain column headers in case anyone else is wondering. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top