Answered by:
Windows Service OLEDB-connection to Excel-file

Question
-
I have a Windows Service that hangs when opening an OLEDB-connection to an Excel-file, like this:
-----------------------
using (var connection = new OleDbConnection(
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
+ fileName + ";Extended Properties=\"Excel 8.0\""))
{
connection.Open();
// start using the connection
}
-----------------------
This code works fine when running as a console application. When I debug the Windows Service with Visual Studio, I can step into the code until I hit the call to connection.Open()- Moved by Jack Zhai-MSFTMicrosoft contingent staff Monday, February 25, 2019 2:01 AM Not test tools issue.
Thursday, February 21, 2019 4:09 PM
Answers
-
Hi friend,
Thanks for sharing here.
This forum is about the Test tools in VS IDE. Discuss the Unit Test, CUIT, Web performance and load test and so on.
As this issue is more related to windows-service development, I suggest that you could open a new thread on stackoverflow. More community members on that forum may further look at your issue and provide more suggestions.
If you have some Test questions, please feel free to contact us. We will try our best to give you a solution.
Thanks for your understanding and cooperation.
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- Proposed as answer by Richard MuellerMVP, Banned Monday, February 25, 2019 1:24 PM
- Marked as answer by Richard MuellerMVP, Banned Monday, March 4, 2019 11:54 AM
Friday, February 22, 2019 10:22 AM -
Another possibility might to ask here:
https://social.msdn.microsoft.com/Forums/en-us/home?forum=exceldev
Richard Mueller - MVP Enterprise Mobility (Identity and Access)
- Proposed as answer by Dave PatrickMVP Monday, February 25, 2019 3:08 PM
- Marked as answer by Richard MuellerMVP, Banned Monday, March 4, 2019 11:54 AM
Monday, February 25, 2019 1:26 PM -
Might also try asking here.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vbgeneral
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=windowsgeneraldevelopmentissues
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Richard MuellerMVP, Banned Monday, February 25, 2019 3:45 PM
- Marked as answer by Richard MuellerMVP, Banned Monday, March 4, 2019 11:54 AM
Monday, February 25, 2019 3:08 PM
All replies
-
Hi friend,
Thanks for sharing here.
This forum is about the Test tools in VS IDE. Discuss the Unit Test, CUIT, Web performance and load test and so on.
As this issue is more related to windows-service development, I suggest that you could open a new thread on stackoverflow. More community members on that forum may further look at your issue and provide more suggestions.
If you have some Test questions, please feel free to contact us. We will try our best to give you a solution.
Thanks for your understanding and cooperation.
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.- Proposed as answer by Richard MuellerMVP, Banned Monday, February 25, 2019 1:24 PM
- Marked as answer by Richard MuellerMVP, Banned Monday, March 4, 2019 11:54 AM
Friday, February 22, 2019 10:22 AM -
Might also try asking here.
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=csharpgeneral
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=vbgeneral
https://social.msdn.microsoft.com/Forums/vstudio/en-US/home?forum=windowsgeneraldevelopmentissues
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Richard MuellerMVP, Banned Monday, February 25, 2019 3:45 PM
- Marked as answer by Richard MuellerMVP, Banned Monday, March 4, 2019 11:54 AM
Monday, February 25, 2019 3:08 PM