I am using ColdFusion MX and am having problems with my batch upload tool which used to work just fine in ColdFusion 5.0.
My text file (as it gets exported from MS Access) looks like this:
"FirstName","MiddleInitial","LastName"
"Matt","J","Jones"
"Steve",,"Smith"
Notice that the second record has no pair of double quotes because the MiddleInitial field was a null value for Steve Smith (he never entered his middle initial into the database and isn't required to).
My problem is that I'm trying to create a query object out of this text file using the following code and it won't work as it's coded:
<CFHTTP
DELIMITER=","
TEXTQUALIFIER=""""
METHOD="Get"
URL=" NAME="GetUsersViaHTTP">
My problem is that since I don't have double quotes as the text qualifier in Steve's middle initial field the page bombs out saying "Incorrect Number of Columns"...meaning it's not able to read the file correctly I assume.
If I do a find and replace to make sure that all fields have double quotes no matter if they are null or not then the page processes just fine. I can't ask my users to do this procedure though.
I've tried everything...textqualifier=","...textqualifier=" ".... stripping out all double quotes from the text file. The only way I can get it to work is if all fields have double quotes.
Please helpppp!
Mike
My text file (as it gets exported from MS Access) looks like this:
"FirstName","MiddleInitial","LastName"
"Matt","J","Jones"
"Steve",,"Smith"
Notice that the second record has no pair of double quotes because the MiddleInitial field was a null value for Steve Smith (he never entered his middle initial into the database and isn't required to).
My problem is that I'm trying to create a query object out of this text file using the following code and it won't work as it's coded:
<CFHTTP
DELIMITER=","
TEXTQUALIFIER=""""
METHOD="Get"
URL=" NAME="GetUsersViaHTTP">
My problem is that since I don't have double quotes as the text qualifier in Steve's middle initial field the page bombs out saying "Incorrect Number of Columns"...meaning it's not able to read the file correctly I assume.
If I do a find and replace to make sure that all fields have double quotes no matter if they are null or not then the page processes just fine. I can't ask my users to do this procedure though.
I've tried everything...textqualifier=","...textqualifier=" ".... stripping out all double quotes from the text file. The only way I can get it to work is if all fields have double quotes.
Please helpppp!
Mike