[0401802a.txt]
ColNameHeader=False
Format=CSVDelimited
MaxScanRows=0
CharacterSet=OEM
Col1=CUSTNAME Char Width 255
Col2=REPNAME Char Width 255
Col3=CUSTEMAIL Char Width 255
[100402me-1.txt]
ColNameHeader=False
Format=CSVDelimited
MaxScanRows=0
CharacterSet=OEM
Col1=CUSTNAME Char Width 255
Col2=REPNAME Char Width 255
Col3=CUSTEMAIL Char Width 255

Etc...

When you create the DSN a schema.ini will be created automatically for
you.
Uncheck "Use Current Directory" and select the directory your csv
file is in. Then click Options/Define Format, then definte the
fields, etc. After this is done, the schema.ini will be automatically
created in the directory you selected.

-- 
 jon
 mailto:[EMAIL PROTECTED]

Wednesday, January 29, 2003, 6:36:38 PM, you wrote:
AO> Jon,
AO> what does a sample INI look like?

AO> Andy

AO> -----Original Message-----
AO> From: jon hall [mailto:[EMAIL PROTECTED]]
AO> Sent: Wednesday, January 29, 2003 5:12 PM
AO> To: CF-Talk
AO> Subject: Re: New problem with csv... argghhh


AO> With all the work you've put into this solution, I hate to even say
AO> this, but may I suggest a better way, that will should a lot of headaches?

AO> Create a ODBC Text Datasource to the file one the machine and then
AO> just use cfquery to turn it into a query...which you can loop over or
AO> whatever else you want.
AO> The ODBC Text Driver has never thrown an error on me complaining about
AO> invalid entries, and it's blazing fast...

AO> Just go the the ODBC Control Panel and create a Text DSN, save the
AO> schema.ini in the same folder as your app, and run something like the
AO> below query.

AO> <cfquery datasource="textsource" name="textqry">
AO> SELECT *
AO> FROM [#filename#]
AO> </cfquery>

AO> voila
AO> --
AO>  jon
AO>  mailto:[EMAIL PROTECTED]

AO> Wednesday, January 29, 2003, 5:44:13 PM, you wrote:


RAB>> OK so shoot me in the foot -  if my csv file has x records and any
RAB>> of  those records have  a BLANK field- this won't work... it comes back
RAB>> with an error in the loop.   Is there any way to force it to fill in a
RAB>> field with a null?  This is especially important with the last record
AO> last
RAB>> field position.


AO> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to