Problem with merrant text driver

Posted 13 January 2009 - 10:45 AM

I am working on Coldfusion 5 and have been having a problem lately. We are building an import routine and one of our imports aren't working properly. It is supposed to submit a .txt file and then run it through the merrant text driver to create a datesource out of it and it isn't working.

Re: Problem with merrant text driver

Nope that is an exact copy of the rror leaving out my server information.
The phone numbers are all in "9999999999" format. No other characters but numbers.

Hmm, maybe the driver is trying to fit 9999999999 into one of its number types and cannot.

1) Does your file have a header
2) Is this a fixed file format that will not change? If so you could try setting up an .ini file to give the driver some hints.

3) Out of curiosity, what database type are you using for other queries? Any chance it is an MS database?

One other thing. What happens if you put a text character in front of the phone number values (ie instead of 9999999999 try "T9999999999" or "(999)9999999"). If that works it would indicate a data type conversion problem.

Re: Problem with merrant text driver

Nope that is an exact copy of the rror leaving out my server information.
The phone numbers are all in "9999999999" format. No other characters but numbers.

Hmm, maybe the driver is trying to fit 9999999999 into one of its number types and cannot.

1) Does your file have a header
2) Is this a fixed file format that will not change? If so you could try setting up an .ini file to give the driver some hints.

3) Out of curiosity, what database type are you using for other queries? Any chance it is an MS database?

One other thing. What happens if you put a text character in front of the phone number values (ie instead of 9999999999 try "T9999999999" or "(999)9999999"). If that works it would indicate a data type conversion problem.

It is a fixed value thing so I did go ahead and create a schema for it but now that instead of using field_1 i used mydata.f1 because i queried all of it but it is now not resolving f1 to be the first column. And no there is no header.

Re: Problem with merrant text driver

Posted 13 January 2009 - 01:54 PM

xheartonfire43x, on 13 Jan, 2009 - 12:43 PM, said:

It is a fixed value thing so I did go ahead and create a schema for it but now that instead of using field_1 i used mydata.f1 because i queried all of it but it is now not resolving f1 to be the first column. And no there is no header.

Not detecting the values or detecting the wrong column as the first column? I am pretty sure .ini give you absolute control over how the file is interpreted. Assuming it is setup properly, and includes the right file name. If it is still not working, can you post your .ini file?

Re: Problem with merrant text driver

Posted 13 January 2009 - 02:02 PM

sansclue, on 13 Jan, 2009 - 12:54 PM, said:

xheartonfire43x, on 13 Jan, 2009 - 12:43 PM, said:

It is a fixed value thing so I did go ahead and create a schema for it but now that instead of using field_1 i used mydata.f1 because i queried all of it but it is now not resolving f1 to be the first column. And no there is no header.

Not detecting the values or detecting the wrong column as the first column? I am pretty sure .ini give you absolute control over how the file is interpreted. Assuming it is setup properly, and includes the right file name. If it is still not working, can you post your .ini file?

Well the first thing that I need to pul from the fil is the 17th column. So i put in mydata.f17 and it gives me this error

Error Diagnostic Information

An error occurred while evaluating the expression:

#mydata.f17#

Error near line 15, column 13.
Error resolving parameter MYDATA.F17
The column F17 is not present in the query named MYDATA. It is likely that you have misspelled the name of the column.
The error occurred while processing an element with a general identifier of (#mydata.f17#), occupying document position (15:12) to (15:23).

Re: Problem with merrant text driver

Well the first thing that I need to pul from the fil is the 17th column. So i put in mydata.f17 and it gives me this error

Error Diagnostic Information

An error occurred while evaluating the expression:

#mydata.f17#

Error near line 15, column 13.
Error resolving parameter MYDATA.F17
The column F17 is not present in the query named MYDATA. It is likely that you have misspelled the name of the column.
The error occurred while processing an element with a general identifier of (#mydata.f17#), occupying document position (15:12) to (15:23).

Well it is hard to tell without seeing the file, but dump the query. What columns does it contain? Also, are you sure the file name in your .ini file matches the file name of the uploaded file? It may not work otherwise.

Re: Problem with merrant text driver

Posted 14 January 2009 - 07:59 AM

Quote

Well it is hard to tell without seeing the file, but dump the query. What columns does it contain? Also, are you sure the file name in your .ini file matches the file name of the uploaded file? It may not work otherwise.

I did a dump and found out that the columns were not actually being called as f1, f2, f3, etc. I had been giving the columns names in the .ini file and when I had originally given the names they were hyphens so when I initially used those names it didn't work. I changed the hyphens to underscores and it works just fine. Thank you.