#  Other Applications & Softwares  > Access Tables & Databases >  > [SOLVED] Run-Time error '-2147217871 (80040e31)'

## mattress58

I am trying to use vba to connect to teradata and run a query. This error comes up when I try and run this big query. Smaller query's it doesn't. I have set connect timeout to 0 and that doesn't help. It looks like the connect makes it and it gets hung up at the .Open part of the code. Thank you for any help.
The error populates here:




```
Please Login or Register  to view this content.
```





```
Please Login or Register  to view this content.
```

----------


## ranman256

That may be the problem, that its too big for ADODB code.

Did you try 'attaching' the table to the access db.  Then running a query?

----------


## Norie

How 'big' is the query?

Is there any error message, for example a timeout?

----------


## mattress58

It is a time out. I just got it to work by adding 



```
Please Login or Register  to view this content.
```


Along with 



```
Please Login or Register  to view this content.
```


that I have above

----------

