Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 911613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:14:16+00:00 2026-05-15T17:14:16+00:00

I have a C# Windows service that listens to a HTTP port and fires

  • 0

I have a C# Windows service that listens to a HTTP port and fires an action upon receiving a HTTP GET request. The action is typically the execution of an application that resides in the same machine (running Windows XP Professional or above).

I now have the requirement for the C# Windows service to listen to incoming SQL queries from a JDBC client and trigger an action, once again, the execution of an application. I am looking for some help to implement a simple ‘listener’ to receive SQL queries from the JDBC client and trigger the action, after returning a response to the JDBC client. Is there any resource/sample code I can refer to? I do not have the option to install any database server (SQL Express, MySQL, etc) on the target machine.

The XML configuration needs to look like –

<XmlConfiguration>
   <SQLListenerPort>18781</SQLListenerPort>
   <HttpRootUrl>http://127.0.0.1:8731/</HttpRootUrl>
   <HttpsRootUrl>https://127.0.0.1:8732/</HttpsRootUrl>
   <ServeHttpsRequests>true</ServeHttpsRequests>
   <Triggers>
      <!-- Sample triggers for testing, please update for production deployment -->
      <Trigger>
         <URL>http://127.0.0.1:8731/CustomerID</URL>
         <Action>MyExecutable.exe CustomerID</Action>
      </Trigger>
      <Trigger>
         <SQL>SELECT * FROM A/SQL>
         <Action>MyExecutable.exe A</Action>
      </Trigger>
      <Trigger>
         <SQL>SELECT * FROM B</SQL>
         <Action>MyExecutable.exe B</Action>
      </Trigger>
      <Trigger>
         <URL>https://127.0.0.1:8732/CASE1/CustomerID/MachineID</URL>
         <Action>TEST.exe CustomerID MachineID</Action>
      </Trigger>
   </Triggers>
</XmlConfiguration>

Behaviour –

The C# Windows service receives SQL query ‘SELECT * FROM A’, looks up the triggers map and fires the executable with an argument (that is, ‘A’).

Thank you for your time.

indyfromoz

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T17:14:17+00:00Added an answer on May 15, 2026 at 5:14 pm

    JDBC is an API that unifies the various database APIs under a generic manager, with a single API to interface with. There is no JDBC protcol, each particular driver loaded by JDBC will use its own, native, protocol to intercat with the database. As such, you cannot listen in a service for ‘JDBC’ call, since there is no such thing as a ‘JDBC call’. If you want to receive a SQL request and return a result set, you will have to implement one of the protocols of a JDBC driver, like TDS for example for a SQL Server driver. To implement a TDS ‘service’ means you have to write a TDS gateway, a completely useless exercise since you can achieve the very same by simply exposing the TDS listenning port of the server itself (ignoring security details…).

    What you can look into is to receive ordinary HTTP web service calls (SOAP or REST) and process them as ordinary web service requests, returning the results as a SOAP response or a RESTful HTTP response. Or you could simply expose an OData service, which can be created straight from an EF project. But the client would have to interact with this service just as any WWW service, there is no JDBC nor other database technology stack involve don the client side.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a windows service that listens to a message queue and processes request
I have a windows service that generates logs as it does some execution. I
I have written a Windows service that I am needing to port over to
I have a Windows service that listens for connections with TcpClient client = myTcpListener.AcceptTcpClient();
I have written a windows service in C# that essentially listens for commands on
I will have a service that runs as administrator and listens on a port.
i have a windows service that get user details and save the result into
I have a Windows service that writes messages to the Event Log. I also
I have a windows service that does some intensive work every one minute (actually
I have a Windows service that runs as a logged-in user (local admin). During

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.