473,327 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,327 software developers and data experts.

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 1796
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*******@gmail.com> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.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
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...
2
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...
2
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...
0
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...
6
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...
0
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...
0
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...
4
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...
3
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.