Windows Service and ODBC

c# odbc sqlbulkcopy windows-services

Question

I'm new to windows services and, as you may have imagined, I'm a little lost. Let me describe the scene.

I'm running a timed service that archives and normalizes data on a SQL server using an OdbcDataReader and SqlBulkCopy. This code works well when I run it in a Windows form project. Then, when I switch the DNS's Data Directory Path from the network share to a local disk (simply simulating the scenario locally), it also works.

Evidently, I'm missing something. I would appreciate any assistance.

DNS

1
1
10/30/2009 10:36:39 AM

Popular Answer

Your login account is used when you execute the Windows form project. The network share mentioned in the ODBC settings cannot likely be accessed by the LocalSystem account, which operates the service.

By selecting the Services Properties->Log On tab and having it run with your account, you may verify this. If it works, there was probably an issue with the access privileges.

I advise establishing a user account with exactly the correct amount of access privileges to allow access to the share.

3
3/25/2010 12:41:07 PM


Related Questions





Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow