Chris,

Use the database to do this job. Databases are meant to pull and manipulate large recordsets. For a recordset this large I would not use CF, since this type of operation places too many cycles on the server that could be used to handle customer requests.

For example in Oracle you can use the UTL_FILE package using the PUT proceedure. Then you can run a shell script or batch file to automate the process and move the file to where you need it to go. (On the SQL Server side you can build a DTS package that does the same sort of functionality)


Jeremy Brodie
Intelix
an Edgewater Technology Solutions Company

web: http://www.edgewater.com
phone:(703) 815-2500
nasdaq symbol: EDGE

>I have been experiencing a CF Bug for quite some time now and I wrote
>some code to get around the problem, but I am amazed that Macromedia
>never posted a fix other then saying to upgrade to MX.
>
>I am writing a text file from a very large query. It takes a few
>minutes to run and exports of the order of 16,000 rows of data to a
>text file. The first CFFILE is a write that only added one row of
>column header descriptions. As I loop through the query I append on
>one row of data at a time. Well I have experienced on large queries
>that CF doesn't always close the file before the loop continues. So
>the next time the CFFILE append is executed an error is generated
>because the file is currently in use. It happens at random times and
>it takes a random amount of time for CF to release the file and allow
>it to continue.
>
>I put a TRY/CATCH statement around the CFFILE append and I could catch
>the error. I then jumped into a loop that would continuously try to
>append to the file up to 500 retries. After the first successful retry
>it jumps out of the loop and continues to read the query and append
>the file. 500 retries seem to work as at 300 tries I still had a few
>times that the file was still open when the next append occurred.
>
>Other people have complained about this problem, but Macromedia never
>did anything about it.
>
>No one else is using the file when the error occurs since the filename
>is always dynamic and unique when created.
>
>Does anyone know if someone wrote a CFX version of CFFILE that gets
>around this bug?
>
>Thanks,
>Chris
More
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to