The correct application design - coded hard vs dynamic

We have a table, 2 columns.  ID and NAME.  When our application install, the script writes 3 records in it in the following order: "Administrators", "Users", "visitors".  If you would think, the data in the table looks like:

ID - NAME

1 - Admins

2 - users

3 - visitors

Then, when it comes to code the application, it is best to think that "Admins will always have an ID of 1, so I write a SQL statement that may make reference to: WHERE ID = 1 - these are the admins.

Or should I be dynamic, where I'd build a function called: getIDByName() and you can pass the name 'Administrators' and it will execute an Execute SQL and return the number 1.  That would mean that when I write the SQL statement above, I would say:

.... WHERE ID = getIDByName ("directors") - Admins

I have a feeling that this dynamic is the best approach, even if it means I'll duty code in several functions to automate it.

Aegis,

The column 'ID' is an autoincremented identity column is controlled by the database underlying If Yes, I would err on the side of caution and not assume that records will be written in the order you want.  What you could do is query this table once and caching results in an application-scope variable, and then query the need to recover the ID according to the needs (save several round trips to the database to retrieve the ID over and over again.

HTH,

-Carl V.

Tags: ColdFusion

Similar Questions

  • -A file association problem exist, which prevents the file you are trying to download from being associated with the correct application of the operating system using the windows 7 IE 11

    --Is a file association problem, which prevents the file you are trying to download from being associated with the correct application of the operating system

    IN USING THE WINDOW 7 IE 11 HOW CAN I FIX IT?

    Try to download the installation offline programs:

  • What are the parameters of the correct application

    After playing with and evolution of applications. I can play is more videos. More since the update of Java 7, 7, it is as if it does not work. Title bar of my Deviant Art site doesn't display correctly. Here is a list of my installed players

    Java Console Console SE 7 Update 7
    

    Microsoft Windows Media Player
    Windows Live Photo Gallery
    Quick Time Player 7.7.2
    VLC Player
    DivX disabled
    Real Player
    Unity Player

    Can you help me with the settings appropriate, please. I am forced to use IE9. Firefox is THE browser for me.

    (Email removed by Mod)

    The reset Firefox feature can solve a lot of problems in restaurant Firefox to its factory default condition while saving your vital information.
    Note: This will make you lose all the Extensions, open Web sites and preferences.

    To reset Firefox, perform the following steps:

    1. Go to Firefox > help > troubleshooting information.
    2. Click on the button 'Reset Firefox'.
    3. Firefox will close and reset. After Firefox is finished, it will display a window with the imported information. Click Finish.
    4. Firefox opens with all the default settings applied.

    Information can be found in the article Firefox Refresh - reset the settings and Add-ons .

    This solve your problems? Please report to us!

  • Is LiveCycle the correct application?

    I am creating a form using LiveCycle ES2, which I intend to send to the various parities.  I need them to be able to just open form, enter data in the fields, save on their end and then submit back to me.  As I'm getting longer long in development of the form, I begin to fear that LiveCyle is not the best app because of all that is at issue.  Am I correct in understanding that the parties will be required to have a specific software on their end in order to perform the desired functions?  The form will not work with some versions of Adobe Acrobat?

    Thank you for any information or suggestions.

    Well, each version of Adobe Reader is free, and the functions that you mentioned above can be made with Livecycle,

    but you will need Adobe Acrobat Pro to Reader Extensions enabled PDF to register on Adobe Reader...

    only with these applications, you are good to go with Livecycle

  • My computer does not display the correct names of my hard drives, but because of disk management.

    original title: Hard Drive rename BUG

    I have a problem with the change of name of the hard disk.

    Disk Management displays the names for each partition, but when I open my computer C only a specific name, the rest of the partitions are named local disk and if I try to change it by right clicking Rename or properties and change volume name, after clicking on ok nothing happens, but more funny that I go to disk management and I can see the change in the name of the partition , but Explorer keeps showing local disk, drives me crazy.

    I am running windows 7 Pro.

    Someone please provide solution.

    Thank you.

    Hello

    Serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    (http://windows.microsoft.com/en-GB/windows7/Back-up-the-registry) How to back up and restore the registry in Windows

    You can try these:

    a. open the Start Menu.

    (b) in the area of the white line (search), type regedit and press ENTER.

    c. click on the button continue in the UAC prompt.

    d. in regedit, go to: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\explorer

    e. in the left pane, right-click on explorer.exe and click on New and key.

    f. type DriveIcons and press ENTER.

    g. in the left pane, click with the right button on DriveIcons and click on New and key.

    h. type the drive letter (EX: E) you want to change the route name and press ENTER.

    i. in the left pane, right-click on the drive letter (EX: E) and click on New and key.

    j. type DefaultLabel and press ENTER.

    k. in the right pane, click with the right button on (default) and click on change.

    To change the name of the reader - l.

    i. enter a name (Ex: My DVD), and then click OK.

    II. go to step n.

    Mr.. to restore the default drive name-

    i. leave it blank, and then click OK.

    II. go to step n.

    n. Repeat steps i to m if you want to add another drive letter icon to change.

    o. close regedit.

    Diana

    Microsoft Answers Support Engineer

    Visit our Microsoft answers feedback Forum and let us know what you think.

    If this post can help solve your problem, please click the 'Mark as answer' or 'Useful' at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • Hello! When I try to install the trial version for Illustrator, I get a message from blocking my mac which says that I don't have the correct application to open the download

    What application I should support Illustrator trial?

    I have Adobe PS6 & bridge

    Hello

    You can download desktop application creative Cloud from the given link: Download Adobe Creative Cloud apps | CC free trial Adobe

    Sign in using your Adobe Id and you can download the trial for desktop application Illustrator Cloud creative.

    Please check the system requirements here: system requirements | Illustrator

    Concerning

    Bianka Attre

  • Need advice from the scriptUI expert on the correct application of the scriptUI Photoshop dialog box

    I'm in the middle of my base obsolete flash to HTML5 version Panel port. Part of the SLA of my group, I wrote a script to create a new photoshop document, including settings for video editing. Since the Panel a separate script file called generating then a window of dialogue for user input. Once the completed script the dialog box and any reference to it has been automatically deleted.

    Because now I'm using a file single hostscript.jsx for my duties I run on issues related to the (re) opening - of the dialog box after the first time.

    The behavior is replicated better when you run the script directly in the ExtendScript Toolkit (oriented itself).

    I'm looking for someone who can give me some advice on how to implement this so that the dialog box can be called a second time without problems.

    Thanks in advance.

    Here is my script:

    Table of predefined parameters

    var vidSizes = [["HD 720 p", 1280, 720], ["HD 1080 p", 1920, 1080], ["Cineon half", 1828, 1332], ['Cineon Full', 3656, 2664], ['Film (2K)", 2048, 1556], ['Film (4K)', 4096, 3112]];

    placeholder for the sequence of AnimationProject

    tempLayer var = "";

    The window reference

    West var;

    BEGINNING OF FUNCTION-

    function makePanelWindow() {}

    value of the width of the list box and text entry

    var charWidth = 15;

    w = Window.find ("dialog", "new project");

    Alert (w);

    {if(w==null)}

    push names in the drop-down list

    var vidFormats = [];

    for (a vidSizes in var) {}

    vidFormats.push (vidSizes [a] [0])

    }

    Animation scriptingUI project settings window

    w = new window ("dialogue {text: 'The Animation project settings'} ',' new project'");

    var grName = w.add ("group");

    var _labelName = grName.add ('statictext');

    var _docName = grName.add ("edittext ', undefined,' '");

    _docName.characters = 40;

    kader owner

    var grKader = w.add ("group");

    Kader 1 ~ parameters

    var size_group = grKader.add ('Committee', undefined, 'Settings');

    size_group.alignChildren = 'right ';

    size_group. PreferredSize = ["", 160];

    drop-down list

    var grDropdown = size_group.add ('group');

    grDropdown.margins.top = 12;

    var _labelSize = grDropdown.add ('statictext');

    _size var = grDropdown.add ('dropdownlist', undefined, vidFormats);

    _size. Selection = 0;

    _size. PreferredSize = [164,22];

    field width

    var grHWidth = size_group.add ('group');

    var _labelWidth = grHWidth.add ('statictext');

    _width = grHWidth.add var ('edittext', undefined, 1280);

    _width. Characters = charWidth;

    var _labelUnit1 = grHWidth.add ('statictext');

    _labelUnit1.characters = 3;

    entry height field

    var grHeight = size_group.add ('group');

    var _labelHeight = grHeight.add ('statictext');

    _height = grHeight.add var ('edittext', undefined, 720);

    _height. Characters = charWidth;

    var _labelUnit2 = grHeight.add ('statictext');

    _labelUnit2.characters = 3;

    Framerate input field

    var grLabel = size_group.add ('group');

    var _labelFramerate = grLabel.add ('statictext');

    var _frameRate = grLabel.add ('edittext', undefined, 24);

    var _labelUnit3 = grLabel.add ('statictext');

    _labelUnit3.characters = 3;

    Kader 2 ~ Generate

    var opt_group is grKader .add ('Committee', undefined, 'Build');.

    opt_group. PreferredSize = ["", 160];

    Checkboxes

    var grCheck = opt_group.add ("group {orientation:"column", alignChildren:"gauche"}");} ")

    grCheck.margins.top = 12;

    var wantND = grCheck.add ('checkbox', undefined, 'New Document');

    wantND.value = true;

    var wantVL = grCheck.add ('checkbox', undefined, "Vidéo Layer");

    var wantVLG = grCheck.add ('checkbox', undefined, 'Group of video layers');

    Cancel and ok

    var buttons = w.add ("group");

    Buttons.Alignment = ['right', 'bottom'];

    var buttons.add = cancelButton ('button', undefined, 'Cancel', {name: 'Cancel'});

    var applyButton = buttons.add ('button', undefined, 'OK', {name: 'ok'});

    Buttons.Alignment = 'right ';

    Values of the label and the name

    _labelName.text = "name:";

    _docName.text = 'new Animation project. "

    _labelSize.text = "size:";

    _labelWidth.text = ' width: ';

    _labelUnit1.text = "px";

    _labelHeight.text = ' height: ';

    _labelUnit2.text = "px";

    _labelFramerate.text = "frame rate:"

    _labelUnit3.text = "Fps";

    // Panel Functions ----------------------------------------------------

    Behavior of the list

    _size. OnChange = function () {}

    var salt = Number (_size.selection);

    _height. Text = vidSizes [salt] [2];

    _width. Text = vidSizes [salt] [1];

    }

    OK and Cancel buttons

    applyButton.onClick = function() {}

    makeDoc();

    Return w.close ();

    }

    cancelButton.onClick = function() {}

    Return w.close ();

    }

    }

    w.Show ();

    }

    END OF FUNCTION-

    makePanelWindow();

    Patrick, try this:

    Replace

    return w.close();
    

    with

    w.close ();
    w = null;
    delete w;
    $.gc ();
    

    in your button functions.

    Hope that helps.

    --

    tomaxxi.com

  • I run Mac 10.5.8 and use firefox for a while. Recently, perhaps after have downloaded you an upgrade, my attatchments not open in the correct application, all files are downloaded in .ashx, which is a real pain. Can you help me?

    See:

    Bug 703015 - Outlook attachments access web download like .aspx
    Bug 704989 - add workaround for handling attachment Outlook Web App (OWA) broken

  • Transaction management in the ADF Application using Dynamic Shell

    Hi all

    I use Jdev 12.1.2. We have an application built using design pattern of Shell of dynamic user interface where each workflow in the application will open in a separate tab. So my question here relates by using transaction management in the workflow.

    I read in many places where we are asked to avoid always using "start new Transaction" as it would open multiple connection. But I also vaguely remember reading that best practices to use in an application built using by using Dynamic user interface Shell, is to have isolated Datacontrol with always start new Transaction.

    So could indicate the recommended approach for impact Shell of the user interface and the performance of the approach?

    Note: We have just a data control in our application.

    Thanks in advance.

    Hello

    the transaction is not defined by the shell of the dynamic tab but the workflow. The shell of the dynamic tab displays only the workflow at a glance. If you plan to display a single feed task several times as tabs in a dynamic tab shell, each indicating a different set of data, then you use "isolate" scope of data control or "adaptive databinding (https://blogs.oracle.com/groundside/entry/towards_ultra_reusability_for_adf). If you are using remote data controls then - if you use ADF BC - each instance of the workflow (in shell dynamic tab tab) creates its own connection to the base and the transaction. Workflow transaction parameters are passed to it.

    So use case issues: If you only display a single instance of a workflow tasks at once in a tab of the shell of the dynamic tab so that you can use the scope of shared control (default) data without doing anything. I however you must show the same workflow multiple times then reach isolated from control data or link Adaptive is the implementation, you should go for. The first option - data control isolated - is expensive because it creates additional database connections. There if its use cases.

    Frank

  • Install HRCS9.0 Linux question: the application designer and Tuxedo domain Boot have SQL error

    People,


    Hello. I was installing HCM and Campus Solution 9.0 with PeopleTools8.53. Server machine is Oracle Linux 5.10 and Windows XP-based client computer.  The architecture of my internet is WebLogic11g/Tuxedo11g/OracleDatabase 11 GR 1 material. PeopleTools 8,53 works correctly in the browser.

    In the database server Oracle Linux 5.10 machine, I run scripts 'createdb10.sql, utlspace.sql, hrcddl.sql, dbowner.sql, psroles.sql, psadmin.sql and connect.sql' one by one. Can I use Data Mover to load Windows XP data into the Oracle Linux 5.10 DB HRCS90 instance. The Data Mover script hrcs90ora.dms is done correctly in Windows XP. Configuration Manager is configured correctly.  But when I login in the application designer, I can't connect and get the message as below:


    «Security Table Manager (Get): the database is release 8.52.»  The PeopleTools running require databases at 8.53 release. »


    I followed the http://docs.oracle.com/cd/E37306_02/psft/acrobat/PeopleTools-8.53-Upgrade_02-2013.pdf document to upgrade HCM and HR 9.0 revision 5 Database Instance HRCS90 in Oracle Database Server with Linux. My upgrade is complete. The above problem is solved.

    When I login in the application designer in Windows XP, the error message as below:

    File: E:\pt853-903-R1-retail\peopletools\src\pssys\stmget.cpp SQL error.

    Stmt #: 2539 error Position: 26 back: 904-ORA-00904: "OPERPSWDSALT": invalid identifier:

    Fail SQL Stmt:

    Select the VERSION, OPERPSWD, OPERPSWDSALT, ENCRYPTED, SYMBOLICID, ACCTLOCK from myAccessId.PSOPRDEFN where OPRID =: 1

    When I boot the Tuxedo Application Server Domain HRCS90 under Linux, I get the same error message as below:

    File:/VOB/PeopleTools/src/pssys/stmget.cpp an SQL error:

    Stmt #: 2539 error Position: 26 back: 904-ORA-00904: "OPERPSWDSALT": invalid identifier:

    Fail SQL Stmt:

    Select the VERSION, OPERPSWD, OPERPSWDSALT, ENCRYPTED, SYMBOLICID, ACCTLOCK from myAccessId.PSOPRDEFN where OPRID =: 1

    ... ...

    GenMessageBox (0,0,M): Signon database: could not access the HRCS90 database with user Psalm code

    I checked the PSOPRDEFN table in the database Linux HRCS90, not the OPERPSWDSALT field.

    I also checked the connection process PS the user traverses the 3 tables: PSOPRDEFN and PSACCESSPRFL, PSSTATUS.

    My oprid, the symbolicid and the accessid ownerid in the 3 tables are correct.

    My question is:

    Why is there a strange OPERPSWDSALT field in the SQL statement that causes Signon failed?  How to solve the problem of access code?

    Thank you.

    > Then it connects with SQL > and then run script rel853.sql, but its outcome is not just because the database is started with sysdba.

    The database is always started '' as sysdba. '' "Useless" to connect as sysdba to run the PSoft script while accessid.

    You need to come back in the book of the Oracle.

    Fair enough, this is my last word to this thread.

    Nicolas.

  • Difficulties to use the swf file that is hard-coded to display flv files

    Hello

    I created a swf player using the flvplayback component to display flv files. The document in flash is 275 pixels wide by pixels long 130px. I also have my video component (flyPlayBack) set to 275px by 100px to display the playback controls. My flash code this is my simple as follows:

    Fl.video import. *;

    var myflashvars:Object = new Object();

    myflashvars = this.loaderInfo.parameters;

    var fullVideoPath:String = "";

    (point var: string in myflashvars)

    {

    If (point == "filename")

    {

    fullVideoPath is myflashvars [point];.

    }

    }

    videoPlayer.source = fullVideoPath;

    So, using the above it should play the video and made.

    (1) the first question is that I tried to play 2 different videos in my html code.

    < object classid = 'clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' codebase =' http://download.Macromedia.com/pub/Shockwave/cabs/Flash/Swflash.cab#version=10, 0,0,0 'width = ' 275' height = "130" >
    < param name = "allowFullScreen" value = "true" / >
    < param name = "movie" value = "moviePlayer.swf" / > "
    < param name = 'wmode' value = 'window' / >
    < param name = "scale" value = 'showall' / >
    < param name = "of the flashvars value ='filename = sample_sorenson2.flv" / >
    < embed width = '275 "height ="130"allowFullScreen ="true"type = ' application/x-shockwave-flash' src =' moviePlayer.swf"pluginspage =" http://www.Macromedia.com/go/getflashplayer 'wmode = "window" scale = "showall" flashvars =' filename = sample_sorenson2.flv "/ > "
    < / object >

    Just like above works fine. But I tried to play 2 different videos, the first video image is less than

    image1.JPG

    The second video is less than

    image2.JPG

    I noticed the video formats are different, but not the size of the video player, is - do a thing called elongation? Is it possible to change this by using my simple actionscript code above?

    (2) I also tried the button full screen, but the video takes a part of the screen, as shown below. Sorry for the size of the image.

    image3.JPG

    It is a common occurrence, is it possible to access the buttons of the flyplayback instance using actionscript and overridding the behavior? Any advice on my situation would be very much appreciated. Thank you.

    For me the first two screen captures look like you set bad size l / h/screen. I don't see any scaling of the player at all... only the black bars on the sides because the video did not fill the video player display together.

    And Yes, there are way to display Flash video NetStream, much more powerful and versatile called. You can design your own player and better control the display. I always use NetStream rather than the FLVPlayback instance.

    But if you're having sizing issues presented during the creation of the video... then the drive itself will not necessarily fix it. You need to know the correct display size and the report l / h for each video that you want to display.

    However, you can adjust slightly the size of the screen for each video using some actionscript... as you see here:

    http://www.cataractvideo.com/CV/physicians/cataract_surgery.html

    an example of a larger version (high brandwidth) and a smaller (low bandwidth) version... According to the button you click.

    More about NetStream:

    http://help.Adobe.com/en_US/FlashPlatform/reference/ActionScript/3/Flash/NET/NetStream.htm l

    Here's a good tutorial on building your own video player NetStream:

    http://gotoandlearn.com/

    Scroll all the way down the page "Video Basics.

    Good luck!

    Adninjastrator

  • How can I get the installer for my application check the operating system type and then install the correct driver type?

    I have a request that I wrote and have been use and distribute for awhile. The installer I created for this application is an additional installer to install a driver for the USB connection. The USB connection is actually a virtual COM Port. The problem is that the people who drafted modified driver setup the installation program itself. They used to have an installer that would check for 32-bit or 64-bit OS and then install the appropriate driver.

    Now, they have two distinct installation programs: one for the other for 32-bit and 64-bit. They let the user know their OS and install the appropriate driver. I'd rather not have to rely on my users to do. From what I've seen the creater Installer provides that an executable to be run after the application installs.

    Is it possible to have the installer of the application, check the type of OS and then run the correct executable file after installing my application? I think that I could write an Installer 'wrapper' that checks the type of operating system then executes the correct Installer. But I expect a better solution.

    Thank you
    Joe

    So, I make it work!

    The trick is to find a way to determine what type of OS you are using. The method I used was, indeed, read the environment variable. A buddy of mine sent me this link:

    http://StackOverflow.com/questions/2401756/how-to-find-if-the-machine-is-32bit-or-64bit One of the phrases he bibliography the Processor_Architecture environment variable.

    It seemed like a reasonable idea. So I started to research how read LV it environment variables turns out, you do it by reading a registry key. There is an example of LV on how to read a registry key. But I did not know where they are in the registry. So, I searched the Processor_Architecture registry. I found it in HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Session Manager\Environment.

    According to the article in the link, this value will already be x 86 for a 32 bit OS, or something with 64 inside. I just check the response for x 86 string. If it is, I just run the x 86 version of the driver Installer. Otherwise, I run the x 64 version.

    It turned out to be as simple as that.

    I hope this helps someone.

    Joe

  • installed the game CD Gears of War on my computer (Windows VISTA) and make me "Please insert the correct DVD - ROM, click OK and restart the application" - but the disk is IN the drive.

    original title: Gears of War for PC (Vista)

    I installed Gears of War game CD on my computer (Windows VISTA) and make me "Please insert the correct DVD - ROM, click OK and restart the application" - but the disk is IN the drive.  I've been on the net and does not know what is the problem and why this game will not run.  I've installed, uninstalled, reinstalled tried to run as administrator, got the latest patch, all the things that have said all sites to do - anyone have any ideas?  Any help would be appreciated!  Thank you!

    Hi NoOneSpeciale,

    It is very possible that your CD may be damaged.  Is it possible to get another copy to try on your machine? Or try this copy on another machine to see if it works or not.
    Also check in control panel--> system--> for you Device Manager make sure that there is no yellow/red icon next to the CD player and it's function correctly.

    Let us know the result, Kevin
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • two user profiles on vista will share the same applications on hard drive

    my granddaughter has created two user profiles on vista with variations of his name.  can copy icons above his profile from first to second?

    Hello

    Yes, it is possible to share the same applications on the hard drive by using two or more different user accounts in Windows Vista.

    For more information see the link below.

    http://Windows.Microsoft.com/en-us/Windows-Vista/demo-understanding-user-accounts

  • The application designer is automatically closes

    Team,

    Whenever the developer of change or create any table, the application designer to automatically closes.

    Kindly Guide.

    Rgds,

    Try to use a different table space when you create the record, which is already used.

    If the table is already built, need to change the storage space. Open the record, goto tools > Data Management > Tablespace defined in the App Designer.

Maybe you are looking for

  • On photos on iphone with iCloud library storage

    How can I limit the space used by photos in ios9 without deleting icloud?

  • E-mail notifications

    Our company uses UTM25 and strive configure the system to use mail notifications settings. I read in several other threads, it requires the use of the SMTP port 25, which does not seem to be supported by a large number of major email service provider

  • XML file in the sequence

    Hello I have the sequence calling executable and I want to pass as a representation xml argument of the file currently open in sequence. "I tried to pass something like - RunState.SequenceFile.Path.GetXML(XMLOption_NoOptions,0), but I get only. How c

  • Embed videos in my screen

    Hi all I have a problem of integration of video in a form with fields. I want to just make screen with video and play, stop, and Pause buttons. Here is the code for my player screen. I added the necessary fields and the video control, but once the pl

  • Develop on the BB Mail blackBerry Smartphones

    I send a mail with an attachment, using the original of the bb program. Then I read that mail, using my own program, but I can't understand if the annex is with the mail. I tried the following functions: 1, getContentType (): return is text/plain; 2,