Link to home
Start Free TrialLog in
Avatar of Santosh Philip
Santosh Philip

asked on

MICROSOFT ODBC TEXT DRIVER TOO FEW PARAMETERS. EXPECTED 48

This worked for over 5 years but today i got the above error message.  Please advise.  Thanks

Here is the connection string:  

DBQ=J:\ISOURCE DATA REPOSITORY;DefaultDir=J:\ISOURCE DATA REPOSITORY;Driver={Microsoft Text Driver (*.txt; *.csv)};DriverId=27;FIL=text;MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;SafeTransactions=0;Threads=3;UserCommitSync=Yes

This is the SQL:

SELECT otc_sales_history_product_detail_spine.TERRITORY_NUMBER, otc_sales_history_product_detail_spine.TERRITORY_DESC, otc_sales_history_product_detail_spine.BRANCH_ID, otc_sales_history_product_detail_spine.BRANCH_DESC, otc_sales_history_product_detail_spine.CUSTOMER_NUMBER, otc_sales_history_product_detail_spine.CUSTOMER_NAME, otc_sales_history_product_detail_spine.CITY, otc_sales_history_product_detail_spine.STATE, otc_sales_history_product_detail_spine.MARKETING_DIVISION_CODE, otc_sales_history_product_detail_spine.MARKETING_DIVISION, otc_sales_history_product_detail_spine.PRODUCT_TYPE_CODE, otc_sales_history_product_detail_spine.PRODUCT_TYPE, otc_sales_history_product_detail_spine.PRODUCT_APPLICATION_CODE, otc_sales_history_product_detail_spine.PRODUCT_APPLICATION, otc_sales_history_product_detail_spine.PRODUCT_LINE_CODE, otc_sales_history_product_detail_spine.PRODUCT_LINE, otc_sales_history_product_detail_spine.PRODUCT_GROUP_CODE, otc_sales_history_product_detail_spine.PRODUCT_GROUP, otc_sales_history_product_detail_spine.ITEM_GROUP_CODE, otc_sales_history_product_detail_spine.CATALOG_NUMBER, otc_sales_history_product_detail_spine.SURGEON_NUMBER, otc_sales_history_product_detail_spine.SURGEON_NAME, otc_sales_history_product_detail_spine.PRIORYEAR_JAN, otc_sales_history_product_detail_spine.PRIORYEAR_FEB, otc_sales_history_product_detail_spine.PRIORYEAR_MAR, otc_sales_history_product_detail_spine.PRIORYEAR_APR, otc_sales_history_product_detail_spine.PRIORYEAR_MAY, otc_sales_history_product_detail_spine.PRIORYEAR_JUN, otc_sales_history_product_detail_spine.PRIORYEAR_JUL, otc_sales_history_product_detail_spine.PRIORYEAR_AUG, otc_sales_history_product_detail_spine.PRIORYEAR_SEP, otc_sales_history_product_detail_spine.PRIORYEAR_OCT, otc_sales_history_product_detail_spine.PRIORYEAR_NOV, otc_sales_history_product_detail_spine.PRIORYEAR_DEC, otc_sales_history_product_detail_spine.CURRENTYEAR_JAN, otc_sales_history_product_detail_spine.CURRENTYEAR_FEB, otc_sales_history_product_detail_spine.CURRENTYEAR_MAR, otc_sales_history_product_detail_spine.CURRENTYEAR_APR, otc_sales_history_product_detail_spine.CURRENTYEAR_MAY, otc_sales_history_product_detail_spine.CURRENTYEAR_JUN, otc_sales_history_product_detail_spine.CURRENTYEAR_JUL, otc_sales_history_product_detail_spine.CURRENTYEAR_AUG, otc_sales_history_product_detail_spine.CURRENTYEAR_SEP, otc_sales_history_product_detail_spine.CURRENTYEAR_OCT, otc_sales_history_product_detail_spine.CURRENTYEAR_NOV, otc_sales_history_product_detail_spine.CURRENTYEAR_DEC, otc_sales_history_product_detail_spine.F47, otc_sales_history_product_detail_spine.F48
FROM `J:\Isource Data Repository`\otc_sales_history_product_detail_spine.txt otc_sales_history_product_detail_spine
Avatar of aikimark
aikimark
Flag of United States of America image

Double-check the column names in the file against your Select clause.
Avatar of Santosh Philip
Santosh Philip

ASKER

Thanks for your response.  Already did that before posting it here.  The file worked till Monday , Tuesday morning is when we started having issues.  Anything else you could think of? Thanks
* A blank line at the beginning
* A space character in one or more column names
* You have back-tick characters where apostrophe characters were expected
* The database engine suddenly became sensitive to field names in the query string and you need to delimit table and field names with "[" and "]"
Thanks, what makes the database engine sensitive suddenly.  This used to work.  I am not an expert at ODBC's i am simply an end user.  Would you be able to show me how to fix this by delimiting the table and the field names?  Thanks for your help
please post the input file
Thanks, file is attached.  Appreciate your willingness to help.  

Do you think this has something to do with any Microsoft updates or drivers that our IT dept pushes on to our machines?  Thanks
July-18.xlsm
You posted an Excel workbook.  Please post the text file.
okay sorry, i should have explained if you go to connections , you should be able to see the connections and SQL's.  But here is the text file.  The highlighted tabs towards the end has the connections.  Here is the text file as well.  Thank you!!
ODBC-TEXT-DRIVER-ERROR.txt
your posted text file is not the data
Okay sorry, i wasnt sure as to what you were asking for.  Attached is one of the data source files which is housed in our data repository.  Thanks
sorry, forgot to hit upload file,  Here it is...  Thanks!
otc_sales_history_product_detail_spi.txt
1. the file is malformed at line 126597.
2. Do you have a schema.ini file in that folder?  If so, please post it.
That's how it has been always. I have these files saved for the last two years and beyond and each of them are like that.  Those are the lines for freight.

I will find out if there is a schema file . I dont see it in here.  Thanks for your help with this.
just wanted to let you know that your last message prompted me to look at the folder again for the Schema file. I know i have seen it in there but could not find it so i looked a screenshot of the folder that i had from last year and it was there.  Our IT was able to restore that folder and the file works again.  Thanks again for all your help.
ASKER CERTIFIED SOLUTION
Avatar of aikimark
aikimark
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you so much.  Not very familiar with the intricacies of how it works, we are just the end users , as long as it works there is no issue and never bothered to understand how it works .  Have a great day!
You're welcome.  Please close this question.
Aikimark provided the best solution to my issue. He stayed at it till it got resolved, did not give up easily.  He isa true professional and my hats off to him .  He is very knowledgeable and resourceful.
Thank you