473,782 Members | 2,485 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Setup up a Database "Waiting List" or Queue

I am working on a windows application that allows a system
administrator to assign users to specific software titles. Let's say
that there are 5 available licenses for Visual Studio but 6 users need
the software at one time. What I did was create an OC table
(out-of-compliance) and added the 6th person to that table. I've also
created a feature in the software that allows the admin to add
additional licenses to the database. Is there a way to configure the
tables to add 2 users from the OC table to the SoftwareUsers table when
additional licenses are added? I'll try to explain it more in-depth:

3 licenses available for VS
4 People need VS
3 People written to SoftwareUsers table
1 Person written to OC table

System admin adds 1 more instance of VS
Person in OC gets moved to SoftwareUsers table

I can see this using some sort of SELECT TOP X where SoftwareTitle =
"VS...." but don't know the easiest way to implement it.

Nov 21 '05 #1
1 1813
Try this approach...

Put in a database trigger on the table that tracks how many liscenses you
have. When the number of liscenses changes (eitehr increased or decreased)
find the difference in liscenses (+x or -x) and then move the users from the
liscensed table to the OC table.

compare the old liscense count to the new to get X
if x is zero (liscence count hasnt changed, you are done)

Create cursors to select the top X values from either table for the
application in question. Which cursor you call depends on whether liscenses
were added or removed.

insert records into the appropriate table and delete them from the original
table

This appraoch should handle it for you.

<po*******@gmai l.com> wrote in message
news:11******** **************@ f14g2000cwb.goo glegroups.com.. .
I am working on a windows application that allows a system
administrator to assign users to specific software titles. Let's say
that there are 5 available licenses for Visual Studio but 6 users need
the software at one time. What I did was create an OC table
(out-of-compliance) and added the 6th person to that table. I've also
created a feature in the software that allows the admin to add
additional licenses to the database. Is there a way to configure the
tables to add 2 users from the OC table to the SoftwareUsers table when
additional licenses are added? I'll try to explain it more in-depth:

3 licenses available for VS
4 People need VS
3 People written to SoftwareUsers table
1 Person written to OC table

System admin adds 1 more instance of VS
Person in OC gets moved to SoftwareUsers table

I can see this using some sort of SELECT TOP X where SoftwareTitle =
"VS...." but don't know the easiest way to implement it.

Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
10212
by: Jan | last post by:
I store sql-commands in a database table. In the first step I get the sql command out of the database table with embedded sql. In the second step I try to execute the command, which i got from the database table, using dynamic sql. Executing 'EXEC SQL DESCRIBE SELECT LIST FOR S INTO select_dp;' the error code -2149 is returned That means "Specified partition does not exist". Does anybody know if it is a database problem or a problem of
2
13800
by: Bob | last post by:
Does anybody know what might cause the following message to show up in the SQL Server Error Log?: Time out occurred while waiting for buffer latch type 2, bp 0x12260f80, page (5:77914), stat 0x40d, object ID 7:421576540:0, waittime 500. Continuing to wait. I've read several articles about what to do about this situation on SQL Server 2000, but I'm running SQL Server 7.0. Specifically, I'm running version 7.00.842. Is there a way to...
2
27393
by: Mark Durgee | last post by:
I have a "submit" button in a form that creates a record in my Filemaker database that works as it should. This is the HTML for it: <INPUT TYPE="SUBMIT" name="-New" VALUE="Add Record"> I have a drop down list on that same form that works fine, but I want it to perform the same submit action as above once a value is chosen. This is the HTML for it:
0
8518
by: Anaam | last post by:
I have a page which is using html area and it is also uploading image files to be place in an HTML file on server side. im using ajax to send requests to server side. page works fine, image is place in target html File, as well as text from html area is also inserted to html file. but after call back from ajax firefox's status bar always show "waiting for 192.168.0.1 ... " where im and testing the page during development. also sometimes...
6
2599
by: Bart van Deenen | last post by:
Hi All I'm happily creating an Ajaxified web-app. I use Prototype for encapsulating xml http requests, with method "post". On the backend, I use PHP, and the replies are eval'd by Javascript. I do not use XML for data encapsulation. The only thing that is off nominal is that my Firefox 1.07 (Mac OS-X) and 1.06 (Linux) have "Waiting for ..." continuously in the status bar. I know from server debugging and packet sniffing that there is...
0
1685
by: wxqun | last post by:
I'm try tuning a SELECT statement which is used by a Cognos cube on a DB2 V7.2 +FP13. After I did the tuning, the "dynexpln" shows the "total cost" is down to 8214567 from 37345265, also I try to run the SQL in the cmd line, it now only took several minutes to return about 50M rows instead of +10 hours. The cube is re-built after the tuning, and I could see the same SQL running by "get snapshot for application.." , also the "list...
0
2193
by: wxqun | last post by:
I'm trying tuning a SELECT statement which is used by a Cognos cube on a DB2 V7.2 +FP13. After I did the tuning, the "dynexpln" shows the "total cost" is down to 8214567 from 37345265, also I try to run the SQL in the cmd line, it now only took several minutes to return about 50M rows instead of +10 hours. The cube is re-built after the tuning, and I could see the same SQL running by "get snapshot for application.." , also the "list...
4
3268
by: Jono | last post by:
Hi Everyone, As it says in the title, I'm looking for a way to display a page while long running operations are performed on the server. Ideally, I'd like some way to push the current request onto some stack, where it would continue to be processed asynchronously (most importantly preserving things like view state, form post data, etc). In the interim, while the main request is processed, a friendly page will be displayed to the user....
3
5168
by: =?ISO-8859-1?B?Rvpsdmlv?= | last post by:
Hello all, My application delay some minutes when I press a button(it's doing some working ). How can I put a message: "Please wating" during this delay? It is important that after the execution finish this message disappear. Fúlvio
0
10313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10146
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6735
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.