How can I restrict more then one user to access the table?

Hi !
I have a problem and two solutions and I am a bit confused as to
which one is the best one and/or can there be any better way of
handling the problem ?
Problem : I have to update a key field of a table when I update
it in the form 5.0 screen. I am basically doing a maintenance of
a table and if a certain field is updated then the change has to
be reflected in two more tables. But the issue is that the field
is a part of the key in those two tables. So all I can think of
is that I need to insert new set or rows for that new value of
the field and delete the old set of records for old values of
the field.
There are two ways of doing it;
1.One option can be to explicitely define two cursors separately
and fetch the values in them one by one and then insert the new
records and then delete the old records in both the tables. This
I feel will be a cumbersome process both in terms of processing
time and the coding.
2.Second option I was thinking can be to create two flat tables
(without keys) and insert the values in them and update the
changed field there and then insert the rows in the respective
tables. Delete the old records in the main tables and delets the
records in these flat tables. This is a bit more faster and
easier to predict and code. This seems to be a better option for
me.
Any comments on these ?
In both the cases I was thinking of making some provision so
that more then one person can't update the table simultaneously.
Since if there are more then one persons doing the processing
then some inconsistency might creep into the whole process.
This is easier to do in the second process as if I check the
data in the flat tables and if there is some data then I can
presume that some one is doing the processing and I can ask the
other person to hold for a while. But in this case how can I
stop more then two people to simultaneously check for the empty
table and start inserting the record ?
I was just thinking of having a sepatare table having only one
field and this will be a key field and as the process begins the
process will insert a fix value say 'Y' in the key field and at
the end of the process the record will be deleted and this way
we can restrict the user to access the process more then one at
a time..? Since you can't have same value of the key in a table
more then once.
Any better way of handling it will be deeply appreciated.
How about locking the table at the begining and releasing the
lock at the end ? Will there be any issue in that? since I am
inserting and deleting the rows in the same transaction.
Comments welcome,
Shobhit
null

How about performing the update IN the database using a stored
procedure?
By using non-database fields on your form to get the
information, you can then call the procedure in the database to
perform the updates. If an error occurs in the procedure you
rollback, if necessary, and send a message or status back to the
form. If it succeeds you might wish to commit and then re-
execute the form's query -- using either the original key values
or the new key values...
null

Similar Messages

  • Can I connect more then one cDAQ-9188 in the same network?

    Hi, I have one question for you.
    Can I connect more then one cDAQ-9188 to moxa EDS-G205-T for querying simultaneously in the same PC?
    thanks in advance for any response.

    You will need a network switch and make sure they are different IP Addresses, but same subnet.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • I have multiple Iphoto libraries. I would love to have them all on my IPAD. However only one is copy to my Ipad. How can I have more then one? TX

    On my MAC I have 4 libraries (just one was to big). I would love to copy all of them on my IPAD. How can I do this?
    Thanks
    Michel

    http://support.apple.com/kb/HT5824?viewlocale=en_US&locale=en_US

  • How can I add more than one song to fit the length of the slideshow

    I would like to add more than one song to my slideshow. I do not want to repeat the same song more than once. Is there a way to add more than one song to a slideshow?

    Great - unfortunately it is not intutative - but simple - once you know the secret - and at least in iphoto '08 it acts like you can select multiple songs using the command key but it only plays the first one
    LN

  • How can i read more then one channel with the amux64

    Im using AI one scan.
    I tryed the string AM1 ! 0,1 and also AM1 !0:1 but it didnt worked.

    Barak,
    Check the following link, it must solve your issue:
    http://digital.ni.com/public.nsf/3efedde4322fef198​62567740067f3cc/ef832cdaf87e9bf8862568a5007b2f47?O​penDocument
    Hope this information is helpful
    L Aguila
    Applications Engineer
    National Instruments

  • Can I add more then one mask item on the data collection ?

    Hi,
    I have a requirement, for example as follows.
    ex.
    Data collection: DC01
    Parameter 1: P1 and Type is text.
    P1 parameter just only allow two values, "AB" or "CD".
    Data collection's mask can do that?  If not, any good soultion can do that?
    thanks!

    Hi,
    There might be the case to use Formula to interpret the input value to one of 3 possible options.
    Though, you can consider the easier approach:
    - set the parameter type to Numeric;
    - set MIN = 1;
    - set MAX = 3;
    - set Mask = #.
    This implies that only 1, 2, or 3 can be entered.
    In Data Collection Prompt, you can decribe which number corresponds to which colour.
    Regards,
    Sergiy

  • Can you use more then one micro photo on the same comput

    i have had my micro photo for a year it works great i just bought another one but my computer wont recognize it. what gives?they are the same player zen micro ohoto 8 gigs

    It should work fine. Both my Microphoto's work connected on XP Pro at the same time, I just have to keep track of which one has what kind of music. Have you tried scanning for plug and play devices, what kind of operating sys are you running? And what software are you trying to sync with.
    Message Edited by VRevolution on 05-23-200706:45 AM

  • How can I select more than one song from the search results?

    I want to create playlists based on certain words in the song title. For example, I may want to create a playlist of all my songs with LOVE in the title.
    Doing the search is easy, but I can't select more than one song at a time. Is there any way in iTunes 12 for Windows to do this? I found an answer in iTunes for Mac, and it basically says to "un-check "Search Entire Library." " but I don't see that option in iTunes for Windows.
    Here is the link to that question: how can i select more than one song from drop down search bar
    I hope some Windows user can help me out.

    Found the "Search Entire Library" option - click on the small (VERY small for my eyesight) down arrow next to the magnifying glass. Also need to select "Filter by: Songs", and then the songs in the main window show the results.
    I'm going to leave this up on the board because 1) in case someone else has this question, and 2) I don't know how to delete it anyway.

  • Can I have more then one MVIEW site connected to single master site?

    Hi,
    I need one help from your end.
    Currently I am working on Basic Replication.For that I am using Read only Materialized views.first i tried with one master site & one Materialized view site its working fine,Can I have more then one MVIEW site connected to single master site referring to same database ? if so how to achive this one..

    Actually one of my senior told me that you need to change number of OPEN_LINKS value like that so for that reason I asked this question.
    Still that problem not solved..
    I will explain what are all the things I did ok.
    IN MASTER SITE:
    I am creating read only MVIEW's.
    first i created one user repadmin and have given
    1>execute any procedure
    2>dbms_repcat_admin.grant_admin_any_repgroup
    3>dbms_repcat_admin.grant_admin_any_schema
    4>select any dictionary
    and all other grants to repadmin user
    then I changed global_name = 'zxincmp' on Master site.
    Then I created mview log for each table (for 85 tables) & then I created mview's for that table on Master site itself. later I took a dump of these 85 mview's . then I transfered this dump to one of my mview site.
    IN MVIEW site:
    I created one user zxdbp_55 and all the above rights are given to this user & i created one public dblink
    "zxincmp" using "TO_CMP"(master site).Then I imported that dump which i took from master site.
    then i created one private link zxincmp in one of my mview site.then i used DBMS_REFRESH.MAKE('')
    to refresh all my tables & to set the interval..
    after that i created index on the mviews..
    this will works out fine for single master & single mvirew site.but I tried with the same procedure to prepare one more mview site,everything is fine but main problem is second mview site is not getting refreshed automatically,i need to do refresh manually from enterprise manager.. then it will get refreshed.
    how to overcome this problem? I am using same db name ,dblink,refresh group for both the mview site will it affects anywhere?
    Thanks & Regards,
    Hanumanth.

  • Can I put more than one user under one Apple ID account. I want to let other family members use imessage on their own Apple device. Or is there another way to get this end result?

    Can I put more than one user under one Apple ID account. I want to let other family members use imessage on their own Apple device. Or is there another way to get this end result?

    You can seach the net for solutions like this one http://appletvvpn.com/how-to-connect-apple-tv-2-to-vpn/ another idea is to use a PC as the control and fit that with a wireless card and set up a ad hoc wireless network that the Apple TV uses. 

  • How can I maintain more than one contact person for a supplier

    Hi
    As per our business requirement , How can I maintain more than one contact person for a single supplier in SRM?
    How these contact persons are supposed to log in to a portal with different user id and passwords and access the bids for same supplier.
    we are in SRM 7, and currently we are creating contact person throug customised BDC.
    please advice.
    Thanks & Regards
    NITIN
    Edited by: nitinkk on Sep 9, 2011 10:22 AM

    Dear Yaniv,
    Thanks for your information,
    I am able to create  users But my problem is How these contact persons are supposed to log in to a portal with different user id and passwords and access the bids for same supplier ? Is there any kind of maping is available for the user/ contact person to the supplier no.??
    Thanks & Regard
    NITIN

  • Can I use more then one apple ID on my computer/osx app store

    Hi,
    I use my MBP/iMac/ipad/iphone for both business and home.  Right now everything is setup to my home apple id (and I have made quite a few purchases with that).  With the release of the osx app store and FCPX,  my company wants to buy these for my computers.  But they want to do this on their apple id.  Can I run more then one id on a mac?  How can I make this work as I know they will want me to start getting more apps as they are released.

    You can have apps from multiple Apple IDs on one Mac. The issue will be that to update Mac apps bought with A ID #1 will require signing into A ID #1 in the MAS. And later when apps bought with A ID #2 need an update you will need to sign into A ID #2 in the MAS to update them. If you can keep that straight and can abide that requirement, there should be no issues.
    The same will be true to update iOS apps, but using iTunes.

  • How can I define more than one baseline in a line chart??

    How can I add more than one straight line across a graph to indicate a target value? The values are percentages.
    Thanks a lot!!!

    When I have needed to indicate a target line on a chart, I have written a formula that would return a negative or positive number for each group. Then when I chart on the formula, it creates a baseline, with those groups beating the target above the baseline, and those failing to meat the target below the baseline. Percentage calculations work well on these types of charts.

  • In Imovie '11, how can I drag more than one set of video clips to my project?

    In  Imovie '11, how can I drag more than one set of video clips into my project.  I know how to highlight in yellow and drag the set, but can I drag a group of sets?  Thanks

    To select multiple clips, hold down the command key as you click multiple clips. Then you can drag them all at once.
    To drag all clips at once, select one, then Edit/Select All. Then drag them all.

  • How can I send more than one document on an email

    how can I send more than one document on one email

    Thank you but I understand that form of attaching a document. However when I select a document then click 'Share' I have the option of sending the document by email as a word or pages document or pdf, what I want to know is can I use this procedure to send more than one document per email and if I can how?

Maybe you are looking for

  • Why does firefox 4 freeze on the 1st result page of google search engine

    I updated to Firefox 4 yesterday and now every time I use the google search engine my screen freezes on the first results page and will not allow me to click on any of the links on it, saying that it is not responding before eventually the screen goe

  • 20" iMac, display not working properly, otherwise OK

    I have a 20" imac with 10.4.11 loaded, Have had it for about 2 years, no problems at all except occasional wake-from-sleep issue. All of a sudden, the display has quit working properly. The computer sounds like it boots fine, but the display only sho

  • Login manager

    So I think I finally got most everything Installed and working, and I can finally say that Arch is the distro for me.  There are however some things I'd like to workout.  I want to use a login manager instead of having to login and typing startx.  I

  • Create new tax code for Belgium company code.

    Dear friends , We are fighting to find a way to create a new tax code for a Belgium company that do the posting below: Credit:       Supplier                   1000,00-       EUR Debit:        GL Account X          1105,00        EUR Credit:       Ta

  • Do I network or buy another printer?

    Hi all, Here's the problem: We have an old iMac from which I poached the printer (Epson USB Stylus Color 880) to go with one of my Beiges. But the user of the iMac (venerable spouse) would like to use a printer occasionally. The iMac is in a small of