Wrox Programmer Forums
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 2nd, 2004, 12:43 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default REORDER LEVEL TRIGGER

Can anyone help. I will like to create a trigger on on the northwind trader database product table column reorderlevel. If the UnitsInStock fall below the reorder level. alert the user that is time to reorder the product. Any all all help will be greatly appreciated. Also If anyone has an Inventory Database that I can use as a model and is shareable please let me know.

Thanks

__________________
Jaime E. Maccou
 
Old April 19th, 2004, 10:52 AM
Authorized User
 
Join Date: Jun 2003
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Default

how exactly is the user suposed to be alerted? with a "net send" or an email, or what?

and what kind of app is the client using? client-server app? web app?
 
Old April 19th, 2004, 02:05 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

The client will recieved a pop box for an alert. I am currently using access project ADP as the front end application.

 
Old April 20th, 2004, 12:30 AM
Authorized User
 
Join Date: Jun 2003
Posts: 77
Thanks: 0
Thanked 0 Times in 0 Posts
Default

i think i would try to solve the problem like this: in the client app, at every 1 minute or so, i would run a query that finds the products that need to be reordered. if the resultset is empty, then no products need to be reordered and the user will not be bothered. if you the query returns results, then show the pop-up box with the products. this will work if the app is running on the client machine, and if access suports timers, or something equivalent.

also, the products shown need to be somehow marked as "shown", since you don't want to bother the user every minute to reorder the same products, over, and over again (until they are reordered). also, the query for identifying the products that need to be reordered needs to filter out the products that have been shown in a popup box to the user. i think you get the ideea.

i think this solution is called a pop solution, since the client is geting the data from the server. another solution, a more complex one, would be the "push solution"; in this case the server should push the data to the clients, but this means that the server must have the possibility to send this data to the client, wich means that a second channel for communication is needed. this channel could be a tcp/ip channel, which means that the server needs to know the ip addresses of the curently connected clients, and the clients need to "listen" for incoming data from the server. or the client could initiate the tcp/ip connection, sometime after it initiates the database connection. as you might see, things get pretty complicated.

i never had to do any of the above, but if i would need to do it tomorow, i would try the pop solution.





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to reorder the auto number column? al-hijjawi SQL Server 2000 3 April 28th, 2006 07:37 PM
Reorder columns in DataSet filipczako C# 3 November 29th, 2005 10:29 AM
LOG-IN and LEVEL cli PHP How-To 2 May 29th, 2005 04:30 PM
access level taoufik Beginning PHP 8 November 15th, 2004 04:29 AM
reorder nodes problem pompluck XSLT 4 November 5th, 2003 09:02 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.