Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

service connecting to remote service

Posted on 1999-06-23
7
Medium Priority
?
170 Views
Last Modified: 2010-04-15
My question is can my service running on the local system
fetch records from a service (SQL server service or sybase server service) running on another machine in the LAN.
If not what do I do/use to solve this connectivity problem
of a service not being able to connect to a remote service.
0
Comment
Question by:chicksaw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 10

Expert Comment

by:rbr
ID: 1262872
yes it can.
0
 

Author Comment

by:chicksaw
ID: 1262873
rbr,
I have an application containing ODBC code which works fine, when run as an application. However the same code when introduced in a service executable does not connect to the same databse on the remote SQL server. It can connect to all DSN's accessing databases on the local machine, but none of the remote machine. If as you say it should, where is the possibility of the error(probably on the service api side of the code).
Any ideas?
0
 
LVL 10

Expert Comment

by:rbr
ID: 1262874
Which OSs?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:chicksaw
ID: 1262875
rbr,
The operating system is windows NT and the service code is in 'C' SDK.
0
 

Author Comment

by:chicksaw
ID: 1262876
initial answer only 'yes' and further no response to further comments.
0
 

Expert Comment

by:corodent
ID: 1262877
Is the DSN for the remote machine a system DSN or a user DSN?  Services can only connect to system DSNs
0
 
LVL 86

Accepted Solution

by:
jkr earned 60 total points
ID: 1262878
The problem is that 'LocalSystem' (the account that services use) has almost administrator privileges, but NO network access - to overcome this limitation, assign your service to run under a certain user account (either using the control panel or by specifying a username/password when calling 'CreateService()').

Please ask if you need more information!

(BTW: I happen to have finished such a project some days ago ;-)


0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
Suggested Courses

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question