Although its not desirable, I 've done bulk insert remotely using coldfusion
up to 40,000 records.
One thing I learned the hard way the first time was after my insert
application finished running, I automatically assumed it should be done
inserting to the database. So I would query and not see all the records
there and thought something went wrong. But in reality, I guess it all
queues up in Cold Fusion server memory and takes a good while to finish. So
be patient with it, it takes a while, especially if you have a lot of table
joins & looping going on.
----- Original Message -----
From: "Guy McDowell" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, April 27, 2001 7:56 AM
Subject: Bulk Insert


> Situation:
>
> Need to add about 1000 records to a remote DB. Trying
> to write a bulk insert type app in CF for it. Pretty
> sure I need to use CFLOOP - list to get it done.
>
> Resources:
>
> Access 2000 DB, csv file of records (comma delimited),
> no admin access to server, 24 hours.
>
> I'm thinking something like:
>
> <cfloop list="#Form.Input#" delimiters=","
> index="ThisFile">
>   <cfoutput>
>     <cfquery name="update" datasource="myDB"
> dbtype="ODBC">
>      INSERT INTO MyTable (Field1, Field2, Field3)
>      VALUES (#ThisFile#)
>   </cfoutput>
> </cfloop>
>
> Form.Input comes, of course, from a textarea field on a
> form not shown here.
>
> Am I even close here? Just wanting tips or pointers,
> not outright answers. I love to learn this sort of
> thing for myself so I always know it. How does this
> know when it has reached EOF?
>
> Guy J. McDowell
> www.guymcdowell.com
>
>
> Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
> Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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