Create Pop-up Trigger ??? Howto ??

  • Hello,

    I'm quiet new to sql but I have already made a few nice triggers by searching the net etc..

    Now where I'm looking for, I want to make a trigger that gives a pop-up on the screen when a certain field is not filled in.

    Can anyone post here a sample becaus I do not know how to start to It?

    Please Can anyone help me?

    Many many thanks

    Ken

    Belgium

  • That's not something to handle with a trigger. It's something to handle in the front end application.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • Isn't there any possibility???

  • some trigger with a Print clause in it??

    Thx

    ken

  • It might be possible if you use a CLR trigger and set up the right messaging services between the server and the client. You can also drive a screw by twisting it with the claws on your hammer, but it's a lot easier, more efficient, etc., to just plain use a screwdriver. You can steer a car by sticking metal poles out from the sides and forcing them into the surface of the road, but it's generally better to use the steering wheel. And so on. Just because something is possible, doesn't necessarily make it a good idea.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • SQL runs on a server. If the trigger were to pop up a message box, where do you think it would pop up?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I'm going to have to agree with GSquared on this one. This definitely does not belong in a trigger and as Gail said the trigger runs on the server so where would the pop-up show up?

    I'd be interested to see the resources you found about triggers and how you are using triggers. Typically you try to limit the amount of work done in triggers. You either do the work in a a stored procedure or the business layer of the application.

    Have you read this article[/url] here on SSC?

  • I think you're architecturally confused.

    SQL Server is a server. Your application will submit an insert or update to the server, and any result from that gets sent to your application, not the user on the screen. SQL Server has no interaction here.

    What you can do is return a message to the application, but it would need to handle that message and then display something. Alternatively, the way most people handle it and GSquared suggested, is that you use the front end to catch this before you submit it to SQL Server and pop a note to the client.

    what is your front end, out of curiosity.

  • Jack Corbett (6/3/2009)


    I'm going to have to agree with GSquared on this one. This definitely does not belong in a trigger

    In fact, it belongs in the client-side validation before the request is ever sent to the server.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Maybe I'am a bit confused ok but I thought If some fields were updated I could sent a print to te screen to tell other fields also have be filled In, but ok no problem.

    I am using sql server and working with sage.

    Can anyone tell me how to make such a pop-up or something

    Thx

    Ken

  • Maybe the Sage programming guide will help you. This is the first I've ever heard of the language.

    http://www.google.com/search?q=sage+programming+guide

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply