ODBC Excel Connection

Hi There - I am trying to fetch data to a large file via ODBC connection in a VM.

“System.Data.Odbc”

“Dsn=Excel Files;dbq=C:\Users\XXXXX\Documents\input.xlsx;defaultdir=C:\Users\XXXXX\Documents;driverid=1046;maxbuffersize=2048;pagetimeout=5;HDR=YES”

In my flow I am doing three of the above - on consecutive files.

The connect activity is working well, however intermittently it will fail, and upon retry is unresponsive, and nothing happens. There doesn’t seem to be any consistency with the failures. Sometimes it might be the first Excel file connect, sometimes the second - when debugging in studio once the Connect to Database connection fails - retrying results in no response, or indeed another fail, just nothing.

Has anyone experienced anything similar - unsure where to go from here, the process requires stability to access the data.

Appreciate any help

Hi @KB_Fleet

Pls check below link,

Happy Automation

1 Like

Thanks @prashant1603765 I have seen this, but hasn’t helped

@KB_Fleet

  1. First use a kill process to make sure excel is not in use ..may be even in retry you need to do the same
  2. introduce a delay when retrying
  3. did you check the system performance when this occurs is the temp files more or cpu usage high?

cheers

1 Like

Hey @Anil_G I have tried all of the above and still encountering random connection fails

Does anyone have any other ideas here

Is the source Excel file on a different computer?

1 Like

No - saving a shared drive file locally - and then using this from \Documents

One of the main issues is when attempting to retry - the next connect just seems to become unresponsive and doesn’t follow through with a retry - I’ve tried killing ‘Excel’ first before attempting another - but this doesn’t work

Do you disconnect after each connection? or saving each connection to a different variable?

1 Like

I disconnect after each connect - I have tried applying the new connections to different variables.

How do you do this? - within the same bot?

1 Like

Yes - the bot copies a file locally then connects and queries this excel file.

I am debugging a Test.xaml in the machine where the copying is already done, so I am purely running the connecting//disconnecting/querying, and getting the same connecting error sporadically.

Ok, if you use just a single file and perform connect, query and disconnect process, are you able to reproduce the issue?

1 Like

Yes - the same as the full process - I am doing this 3 times - I am reproducing the same error - and if I retry the Connect activity - nothing happens - not even an error sometimes

Close everything, create brand new project, just process a single file (don’t copy/paste anything from the existing xaml file), reproduce the error and post some screenshots of your process and the result please.

1 Like

I am having issues there connecting to the DB but seems different to that of the original Process file - looking into that.

I have noticed the ‘Connection Pooling’ Tab is having positive effects, when setting this Pool Timeout to 60 - but unsure if this is a graceful resolution..

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.