Skip to main content
Question

ODBC connection to Excel file and select data


Forum|alt.badge.img+3

When I used ODBC to connect an Excel file and select data from excel file. I always get error say too few parameters expected 2

 

any one have same experience and can advise me?

6 replies

Forum|alt.badge.img+19
  • Most Valuable Pathfinder
  • 2694 replies
  • March 16, 2022

Hi @Mingshan Xu​ ,

 

Before DB Step can you keep a Message box and check whether you are getting values for FromDate and ToDate?


Forum|alt.badge.img+3

yes, it shows 2022-3-16 and 2022-3-21


Forum|alt.badge.img+3

even change data format also can not do, the error is same.


Forum|alt.badge.img+3

it is strange that last time this bot is working without problem


Forum|alt.badge.img+19
  • Most Valuable Pathfinder
  • 2694 replies
  • March 18, 2022

Hi @Mingshan Xu​ ,

 

Can you copy this query and try to hardcode the values in SSMS and try to execute? you will get lead if there is any format or syntactical error which is causing this issue in AA.


Forum|alt.badge.img+12

Hi @Mingshan Xu​ ,

 

The issue can be caused due to multiple reasons:

  1. If there is an error in Connecting database: it can be resolved by building the correct connection string.
  2. If there is an error in fetching the value from the column which contains space: It can be resolved by removing blank rows.

 

Also, as @ChanduMohammad S​  suggested you can always copy this query and try to hardcode the values in SSMS and try to execute. If there is any syntactical error that will be displayed there only.

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings