ODBC Call Failed Timeout Expired when transferring a spreadsheet to SQL Server

Hello Expert,
For some reason I am getting an error when trying to run a transferspreadsheet function in Access (FE).  I have an Access ADP project connected to a SQL Server 8.  I am using Access as the Front end.  I have a VBA code that transfers a table to an Excel file.  After a little while I get an error message
Run time error 3144
ODBC - Call Failed
Timeout expired (0)

Here is part of the code
Public Sub send2excel()

Dim strFolderName As String
Dim strFileName As String
Dim strbase As String
Dim Response As Variant
Dim objExcel As Excel.Application
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet

Set objExcel = New Excel.Application
strbase = "basecon_"
strFolderName = BrowseFolder("What Folder you want to Export?")


Response = InputBox("Enter Report as of date ex.YYYYMMDD format")



MsgBox strFolderName & "\" & strbase & Response

xlsf = strFolderName & "\" & strbase & Response



'Export the table to Excel
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "dbo.BASECON_USD", xlsf, True


'Open the Excel spreadsheet and set up the Variable
Set wb = objExcel.Workbooks.Open(xlsf)
objExcel.Visible = True

'Get a reference to the first worksheet.
Set ws = wb.Worksheets(1)



dan5460Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Leigh PurvisDatabase DeveloperCommented:
After a while?
How many records are we talking about in this table?
0
dan5460Author Commented:
The table that I am trying to export to excel has about 450 records.  

After a while, about 1 minutes.

Thanks

Danny
0
Leigh PurvisDatabase DeveloperCommented:
Not many then.

Just a couple of things though.
There's no need to be creating your Excel application instance at the start of your procedure when you don't use it until the end.
Do it all together later on - after the export.
And of course - make sure they're all tidied up afterwards.


You could try an alternative export method too - just to see if it makes any difference.  Like
docmd.OutputTo acOutputTable, "dbo.BASECON_USD", acformatxls, xlsf, false
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dan5460Author Commented:
Sorry for the delay, problem was resolved.  Your last comment helped

Thanks
0
Leigh PurvisDatabase DeveloperCommented:
No probs.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.