Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: Newsgroup User
Is there a benefit to the cffile approach over the cfhttp? I changed my
approach back to the original way. I download the file from RealComp to my
server, I use cfhttp to turn the file into a query and then loop its
contents into a database and then delete the file. I am only reading it
once.
What I need to do is if there is a bad line of file, to skip over it and
move to the next. It is not critical to have all the files entered into the
database. Its only filler data for searching properties.
Is there a way to use try and catch to look at each line in the query and if
its good, insert it, if not, skip over it? I may log it for reference in the
future, but that is easy enough to do in the cfcatch block.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
Originally posted by: Stressed_Simon
Notice I have used the Java String Object instead of looping through as a list. This is because on a large file this approach will have unbelievable speed increases over looping through as a list.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Copy link to clipboard
Copied
quote:
listToArray() definitely does not use split() under the covers as it is not even close to as fast. I never use it any more. I got told by a guy from Macromedia that it was quicker to use cfloop and arrayAppend() to create an array from a list than using listToArray() I haven't tested it but it would not surprise me.
Copy link to clipboard
Copied