Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2004
    Posts
    199

    Unanswered: Messge to specified Client

    I know that SQL has many ways to send message to Current Connection, but I wonder is there any way to Send Message to an Other, specified Connection.

    Let suppose ther is an application that makes an inserts in a table (for example cash transfers) and I need a tool to pring all new row via other application that should receive a message that a new row is added (fired by trigger, for example) but problem is that entry and printing applications arenn't same applications and they have separate connections to the SQL
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

  2. #2
    Join Date
    Dec 2002
    Posts
    1,245

    Re: Messge to specified Client

    I'm not certain that this is what you are looking for, but you might be able to use xp_cmdshell to NET SEND a message to the users machine name. That raises some security issues since to invoke xp_cmdshell you need sysadmin role (or you need to config the sql agent proxy account, which in itself can be problematic).

    Aren't there some other options? Perhaps having the process that invokes the print job write a record to a table (with the necessary user info) and then reading that info from the process that actually prints the job?

    Dunno, I think we'd need to see a bit more info about what you are trying to do to help you...

    Regards,

    hmscott

  3. #3
    Join Date
    Feb 2004
    Posts
    199
    xp_cmdshell is the way that I've thought about, but problem is that by design the printing app should be runing on client's computer and don't shared via network, also I don't want to run exe app each time a row is added, it may slow down the server. better way is to have a bit field in the supposed table , that is reset by dedault and design printing app to check unset rows by timer , print them and set to 1.
    But this isn't the best way out too for me, If i could make SQL to send messages to other connection, I wouldn't have needed to check flag fileds to print them time by time.
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

  4. #4
    Join Date
    Dec 2002
    Posts
    1,245
    Sorry; outside of xp_cmdshell, I'm not certain of other alternatives. I'm not sure I see what's wrong with setting a flag in the table to be checked by the printing process; it should not be a huge performance hit and if properly indexed and used with an SP, it should execute pretty cleanly.

    Regards,

    hmscott

  5. #5
    Join Date
    Feb 2004
    Posts
    199
    seems flagging is the only way (maybe not bad) for me
    thanks anyway.
    MDB, ADP <-> MS SQL + VBA, ADO & RDO, .NET, Oracle, Java/Jsp.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •