Avatar of hazemfadl
hazemfadlFlag for Egypt

asked on 

Multi User Web Application Problem

Hello,

First, I would like to explain the application idea:
It is a Press Archive application that storing Articles and its Author(s), Subjects(s) and image files.
The application has a data entry form (Tab style) that enable the data entry person to do the following:
First Tab: Add/Update/Delete Article
Second Tab: Add Image Files Name
Third Tab: Add Author(s)
Fourth Tab: Add Subject(s)
There are 2 Problems:
1. Sometimes I have duplicate Article ID
2. When someone adds a subject it appears in other users list of subject!!!

Database Tables:
Ar / Subjects / Authors / ArSubject (Link between Ar and Subjects) / ArAuthor (Link between Ar and Authors)

These 2 problems happen when there are 2 or more operators on the system.

Application Language: Classic ASP / MS SQL Server 2005.

My Gues:
That there is a problem happen when multi user try to Add/update the same table
For example:
When you add subject (it is done on SQL as SP)
1. Check for Subject in subject table
    --> If exsists: get SubID
          --> Check if it is exsists in ArSubject and if not add a record to link it to Ar (ArID,SubID)
    --> If not: add it and get SubID
          --> add a record in (ArSubject) to link them

Please note:
ArID, SubID,AuthID,... not autonumber

Thank you for your help.
Web Languages and StandardsMicrosoft SQL ServerWeb Applications

Avatar of undefined
Last Comment
hazemfadl
Avatar of EugeneZ
EugeneZ
Flag of United States of America image

something like this:

 

if exists (select * from  Subject where SubID='somenumber')
Begin
  if exists (select * from  ArSubject where SubID='somenumber')
    Begin
       --do something
    End 
   Else
    Begin
     insert into ArSubject (SubID) Values ('somenumber')
    End
End
 
Else
  Begin
    print 'Subject does not have '+ 'somenumber'
  End

Open in new window

Avatar of hazemfadl
hazemfadl
Flag of Egypt image

ASKER

Thank you anyway but I think I did not explain it right.

I already have a SP doing the job of check and add,

the problem not in the code the real problem is in Logic i think ...

Let us assume that both of us working as a dataentry operators ... When I add "Water" to my article you will have the same in your article !!

This is the problem ....
ASKER CERTIFIED SOLUTION
Avatar of EugeneZ
EugeneZ
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of hazemfadl
hazemfadl
Flag of Egypt image

ASKER

Hello again,

sorry for the delay, but I reviewed all the code and I found that the error is in the login of implementation ..

anyway thank you for your help ...
Avatar of hazemfadl
hazemfadl
Flag of Egypt image

ASKER

Thank you
Microsoft SQL Server
Microsoft SQL Server

Microsoft SQL Server is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.SQL Server is available in multiple versions, typically identified by release year, and versions are subdivided into editions to distinguish between product functionality. Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning.

171K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo