Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Development
»
Create Pop-up Trigger ??? Howto ??
11 posts, Page 1 of 2
1
2
»»
Create Pop-up Trigger ??? Howto ??
Rate Topic
Display Mode
Topic Options
Author
Message
adriaensken
adriaensken
Posted Wednesday, June 03, 2009 8:46 AM
Grasshopper
Group: General Forum Members
Last Login: Wednesday, October 07, 2009 6:06 AM
Points: 18,
Visits: 57
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
Post #728268
GSquared
GSquared
Posted Wednesday, June 03, 2009 8:47 AM
SSCoach
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 1:55 PM
Points: 15,442,
Visits: 9,571
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
Post #728271
adriaensken
adriaensken
Posted Wednesday, June 03, 2009 8:48 AM
Grasshopper
Group: General Forum Members
Last Login: Wednesday, October 07, 2009 6:06 AM
Points: 18,
Visits: 57
Isn't there any possibility???
Post #728275
adriaensken
adriaensken
Posted Wednesday, June 03, 2009 8:53 AM
Grasshopper
Group: General Forum Members
Last Login: Wednesday, October 07, 2009 6:06 AM
Points: 18,
Visits: 57
some trigger with a Print clause in it??
Thx
ken
Post #728280
GSquared
GSquared
Posted Wednesday, June 03, 2009 8:54 AM
SSCoach
Group: General Forum Members
Last Login: Tuesday, May 21, 2013 1:55 PM
Points: 15,442,
Visits: 9,571
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
Post #728281
GilaMonster
GilaMonster
Posted Wednesday, June 03, 2009 9:24 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 3:56 AM
Points: 37,734,
Visits: 30,003
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 2008, MVP
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
Post #728315
Jack Corbett
Jack Corbett
Posted Wednesday, June 03, 2009 9:39 AM
SSChampion
Group: General Forum Members
Last Login: Friday, May 17, 2013 12:22 PM
Points: 10,571,
Visits: 11,871
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
here on SSC?
Jack Corbett
Applications Developer
Don't let the good be the enemy of the best. --
Paul Fleming
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Post #728329
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Wednesday, June 03, 2009 9:42 AM
SSC-Dedicated
Group: Administrators
Last Login: Today @ 1:14 AM
Points: 31,433,
Visits: 13,746
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.
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #728335
GilaMonster
GilaMonster
Posted Wednesday, June 03, 2009 9:45 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Today @ 3:56 AM
Points: 37,734,
Visits: 30,003
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 2008, MVP
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
Post #728339
adriaensken
adriaensken
Posted Wednesday, June 03, 2009 2:11 PM
Grasshopper
Group: General Forum Members
Last Login: Wednesday, October 07, 2009 6:06 AM
Points: 18,
Visits: 57
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
Post #728509
« Prev Topic
|
Next Topic »
11 posts, Page 1 of 2
1
2
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.