Advertisement

04.01.2008 at 04:05PM PDT, ID: 23287612
[x]
Attachment Details

Create ASP (VBSCRIPT) Page with login sessions that Updates Records in SQL Table

Asked by super786 in Active Server Pages (ASP), JavaScript, VB Script

Tags: ASP, VBSCRIPT, JAVASCRIPT, IE 6, IE 7, IE 8, Firefox 2.0

This may be easy or difficult - regardless its 500 points.

Here's what I am working with -

1. MS SQL Server:

I have many database schemas within ONE server.
Server Name = "ONESERVER", and the schemas within this server are client schemas, and are named -
SCH_A,
SCH_B,
SCH_C,
SCH_D,
SCH_E...and so on

2. Each Client Schema has two tables (for this task however). These tables however contain data pertaining to that client. The two tables are -

"VENDORS"             (Cols: USER_ACCOUNT, LAST_NAME, FIRST_NAME, VENDOR_STATUS)
"REVIEW_ASSIGNMENTS"      (Cols: RA_ID, USER_ACCOUNT, RA_STATUS)


I load review assignments for vendors to review on a weekly basis,which means that I insert into REVIEW_ASSIGNMENTS table for that schema, the USER_ACCOUNT (Ex: JDOE), and set RA_STATUS to "ASSIGNED". The RA_ID is Autonumbered as Unique ID.

So when JDOE from SCH_A logs into my website, he sees that he has reviews to do
(because they are in "ASSIGNED" Status in the REVIEW_ASSIGNMENTS table in SCH_A schema on the back end).

--This is what I want to do--

I want to create another ASP page that gives JDOE the option to REASSIGN that particular review (remember, unique RA_ID) to another vendor in his group (so from the VENDORS Table in SCH_A schema that he exists in).

This page would only show JDOE a select list of USER_ACCOUNT from the VENDORS Table SCH_A schema whose VENDOR_STATUS = 'ACTIVE' (because that's where he's from)

Basically, the SELECT SQL query would be:

SELECT USER_ACCOUNT
FROM VENDORS
WHERE VENDOR_STATUS = 'ACTIVE'

Then, when JDOE selects the user from the generated form above and clicks a Submit button, it should update as follows:

Update REVIEW_ASSIGNMENTS
SET USER_ACCOUNT = ? (the USER_ACCOUNT JDOE selects from the form)
WHERE RA_ID = ? (the RA_ID of that specific review)
AND RA_STATUS = 'ASSIGNED'

So once the USER_ACCOUNT field has been updated from JDOE to whomever he selects from that list, it will assign that specific review to that vendor, and then redirect to "assignment_list.asp"

Each schema's Login/password is the same. (So for SCH_A, the Username is SCH_A, password SCH_A; For SCH_B, its SCH_B/SCH_B, and so on...)

---

A short scenario recap:

JDOE from SCH_A has 25 Assignments is his review list. He realizes that one of the assignments is assigned to him accidentally. He clicks on a link called "Reassign" (which I will hotlink), that takes him to the page (request above). On that page he sees a drop down list with a list of ACTIVE Vendors from his group in SCH_A. He picks a user_account, say 'HCLINTON' and clicks Submit, then gets redirected back to his review list (assignments_list.asp)

On the back end, the USER_ACCOUNT field in the REVIEW_ASSIGNMENTS table is updated from JDOE to HCLINTON. Now HCLINTON has that specific assignment on her list to review.


---

I tried to be as detailed as I could be, but if you need any info, pls feel free to ask. I am hoping to get this done by end of day tomorrow. I would really need an ASP page written out because I am not a programmer (but willing to learn :))


THANKS A LOT!Start Free Trial
[+][-]04.02.2008 at 02:05AM PDT, ID: 21261197

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 08:50AM PDT, ID: 21264339

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 12:53PM PDT, ID: 21266764

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Active Server Pages (ASP), JavaScript, VB Script
Tags: ASP, VBSCRIPT, JAVASCRIPT, IE 6, IE 7, IE 8, Firefox 2.0
Sign Up Now!
Solution Provided By: super786
Participating Experts: 1
Solution Grade: A
 
 
[+][-]04.02.2008 at 01:04PM PDT, ID: 21266880

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 01:06PM PDT, ID: 21266895

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.02.2008 at 01:47PM PDT, ID: 21267343

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628