Help with dynamic checkbox from database results

Hi,
I am creating some dynamic checkboxes from the results of a database read to sqlite.  I am able to get the data and the correct number of checkboxes is being created but I'm having a problem populating the labels for the checkboxes.  Here is the section of code that gets the results from the database and creates the checkboxes.
                var result:Array = stmt.getResult().data;
                for each( var obj:Object in result )
                    var cb:CheckBox = new CheckBox();
                    cb.label = obj.toString();
                    cb.setStyle("color", 0x00593B);
                    cb.setStyle("symbolColor", 0x000000);
                    container.contentGroup.addElement(cb);                   
Neil

This was answered on another forum for me.
The line cb.label = obj.toString();
needed to be changed to the data.
cb.label=obj.myDatabaseFieldName;
myDatabaseFieldName would be whatever column you are pulling the data in from and should be the actual name in the table.
Neil

Similar Messages

  • Help with Retrieve attributes from database

    Hi,
    I'm using filter "Retrieve from or write to database" with select query from database by selecting attributes as column names radio button.
    I'm unable to get these user attributes with column names.
    For eg : select tag from test_tag where rownum=1;
    I was trying so that result can be used using tag attribute (${tag}).
    Please help in this regard.
    Thanks,
    Vani

    Hi Vani,
    After the retrieve filter, add a Trace Filter and leave it as it is. Execute the policy once and in the trace data that now will be displayed there you should be able to read out the exact name and type of the parameter. This way of identifying data/parameters etc is a recommended way of working while developing! Copy paste the Trace Data from the Trace filter here if you need help!
    Cheers,
    Stefan

  • Help with ComboBox, datasource from database

    Hi there,
    i am new to Flex technology and desperately need help with
    combobox.
    I have a combobox in my app and the datasource comes from
    MySQL database. I use a PHP script to populate the combobox. Say in
    the datatabse table, I have the following result:
    id name
    1 dog
    2 cat
    3 horse
    In the app, the combobox will have the list as the name of
    the animals: dog, cat, horse. But when the user selects dog, how do
    I get the selected id 1 instead of the label "dog".
    Any help/suggestion will be appreciated.

    Hi again,
    the xml for the combobox datasource is as follows
    <animals>
    <animal>
    <id>1</id>
    <name>dog</name>
    </animal>
    <animal>
    <id>2</id>
    <name>cat</name>
    </animal>
    <animal>
    <id>3</id>
    <name>horse</name>
    </animal>
    </animals>
    and my <mx:HTTPService> is:
    <mx:HTTPService id="dropDown" useProxy="false" url="
    http://localhost/~ronnyk/combobox.php"
    resultFormat="e4x" result="get_drop_down(event)" />
    public function get_drop_down(e:ResultEvent):void{
    var dropArr:XML = e.result as XML;
    cb.dataProvider = dropArr.animal;
    cb.labelField = "name";
    cb.data = "id";
    public function clickme():void{
    txtinput.text = cb.selectedItem as String;
    I can't figure out which part I did wrong, in order to get
    the id instead of the name when the user clicks the button

  • Help with displaying info from database+asp

    How can I display info from a database so that it is
    formatted into rows in a table
    here is an example of what I would like
    http://www.westerveltcollege.com/new/programs/bus_admin_computers.html
    (it is the section that show the course content)
    I know it has been code into the table but how to do this
    dymanically
    hope that makes sense to someone ;)

    To do it properly you would set up two tables. The first
    would contain the
    topics and be something like this
    topicID
    topicName
    Then you would have a second table that would hold the
    content like this
    contentID
    contentName
    topicID
    The last field links this table to the topic.
    To display them you would link the topics into a master list,
    and then pass
    the topicID to the page displaying the content and use the
    topicID as a
    filter on the content table.
    Paul Whitham
    Certified Dreamweaver MX2004 Professional
    Adobe Community Expert - Dreamweaver
    Valleybiz Internet Design
    www.valleybiz.net
    "jnc1965" <[email protected]> wrote in
    message
    news:eeot1q$db0$[email protected]..
    > nice one thanks
    >
    > now one more quetion
    > how do I set up the info in the database
    > I have serveral page for different topics and each page
    has a table like
    > mentioned above
    > I dont want to make a different colunm for each for the
    course contents
    > I would like to build one table and have each subject's
    course content in
    > a
    > column but how would I do this?
    > and still have appear like the example
    >

  • Is it possible to make a search help with dynamic  selection table?

    Hi Experts,
    Is it possible to create search helps with dynamic seletion tables means
    i dont know the selection table names at the time of creation of search help.
    These tables will be determined at runtime.
    if yes, Please give an idea how to create and pass the table names at runtime.
    Thanks
    Yogesh Gupta

    Hi Yogesh,
    Create and fill your itab and show it with FM F4IF_INT_TABLE_VALUE_REQUEST
      CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
        EXPORTING
          retfield        = 'field to return from itab'
          dynpprog        = sy-repid
          dynpnr          = sy-dynnr
          dynprofield     = 'field on your screen to be filled'
          stepl           = sy-stepl
          window_title    = 'some text'
          value_org       = 'S'
        TABLES
          value_tab       = itab
        EXCEPTIONS
          parameter_error = 1
          no_values_found = 2
          OTHERS          = 3.
    Darley

  • I am facing a Problem with reading images from database

    Hi everybody..
    any help will be most appreciated, I am facing problem with reading images from database. I am pasting my code... 
                    string connect = "datasource = localhost; port = 3306; username = root; password = ;"; 
                    MySqlConnection conn = new MySqlConnection(connect); // creating connecting string
                    MySqlCommand sda = new MySqlCommand(@"select * from management.add_products ", conn); //creating query
                    MySqlDataReader reader; 
                    try
                        conn.Open(); // Opening Connection
                        reader = sda.ExecuteReader(); // Executing my Query..
                        while (reader.Read())
                            byte[] imgg = (byte[])(reader["Picture"]);
                            if (imgg == null)
                                pc1.Image = null;
                            else
                                MemoryStream mstream = new MemoryStream(imgg);
                                pc1.Image = System.Drawing.Image.FromStream(mstream);
    It says Parameter not Valid... i am reading all the images from database

    I agree with Viorel. You are getting the error because the format of the data is incorrect probably because the data was modify. It may not be the reading of the database the is incorrect, but the application that wrote the data into the database. You need
    to compare the imgg array data with the data before it was written to the database to see if the data matches.  I usually start by comparing the number of bytes which is easier to check then compare the actual to isolate which function is changing the
    byte count.
    An image is binary data.  The standard VS methods for reading and writing data (usually stream classes) default to ASCII encoding which will corrupt binary data.  The solution usually is to use UTF8 encoding instead of the default ascii encoding. 
    Ascii encoding with stream often aligns the data and adds extra null bytes to the end of the data which can produce these type errors.
    jdweng

  • Dynamic menus from database with URL parameters

    Hello!
    I'm trying to build a set of dynamic menus that would be based on data from the database. I need to have a menu item for every database row, and all the items point to the same page, but each with its own parameter in the item's URL. The URLs in the menus would look like ".../form.jspx?recordID=xx", where xx is read from the database.
    Right now, I can display the menu, everything works fine, but the problem is in the PageMap section of Databindings.cpx - ADF needs to have every URL mapped to a page definition. So even if I have "form.jspx" mapped to "form_PageDef", I have to explicitly tell the server that "form.jspx?recordID=xx" is also mapped to "form_PageDef" by putting this into Databindings.cpx.
    Of course, if I have to manually enter page mappings for all the record IDs that appear in the menu, it's not really a "dynamic menu" anymore. Does anyone know of a way to avoid this problem?
    Can I somehow change Databindings.cpx programmatically? Can I change page mappings dynamically? Help, please? I'm very grateful for any and all info.

    Hi Vex,
    I'm not sure whether you'll find a solution as "Dynamic" as you are describing with dynamic entries via the DataBindings.cpx. Menu's work quite differently in JSF (See section 19.2 on dynamic menus in the developers guide). You may need to get the solution halfway.
    1) Drive the menu contents / structure from the database via some backing bean. The sample application that comes with JDeveloper has a fixed menu structure via exposed beans. You'd have to adapt this to be driven off of a managed bean. This takes a bit of work, but it can be accomplished. You'll need to loop through your database records via the Iterator to build the content of your menuModel
    2) Let JDeveloper create the entries in DataBindings.cpx to map the pageDef.xml file to each jspx file. (Manual). The pageDef.xml file gets interpreted during the initContext phase of the ADF Lifecycle, and the DataBindings.cpx tells this phase where to look to create the runtime version of the pageDef.xml (See developer's guide 13.2.3).
    3) Manually setup your faces-config with the right outcomes.
    4) have the database return the outcomes and viewIds, among other values.
    5) do the appropriate thing in your JSPX to make use of this menu module backing bean.
    In this case, you'll control the content and structure of the menu via the DB. However, you'd have to make sure the data in your DB matches the definitions of the jspx viewid's and outcomes.
    However, there is a quite a bit of work involved to do this. I.e. db design, backing bean for menu module, disciplined co-ordination between DB and JSF, etc...
    I hope this helps.
    Kenton

  • Need help with Dynamic Excel File Name please.

    I am try to output an excel file with dynamic date. 
    Here what I done.
    I am using SQL 2012.
    Create Execute SQL Task Connect Type: Excel
    Create Data Flow Task set to DelayValidation: True
    Create OLE DB Sourc
    Create Data Converstion
    Excel Destination
    Excel Connection, Expression, select ExcelFilePath
    @[User::sXLFilePath] +  @[User::sFileName] + RIGHT("0" + (DT_WSTR, 2) DATEPART("DD", GETDATE()), 2)+ RIGHT("0" + (DT_WSTR, 2) DATEPART("MM", GETDATE()), 2) + RIGHT((DT_WSTR,
    4) DATEPART("YYYY", GETDATE()), 2) +".csv"
    C:\ExcelOutPut\SOX_CAM_SQL_Report_010215.xls
    What I try to accomplish is output the file with each day append to it, date must be DDMMYY.
    I google it and found many samples, tested it, and none of them is work for me. 
    Any suggestions or some examples to share is greatly appreciate. 
    I am new to SSIS.  I found one poster have similar issue and inside the posted below, there was one suggestion to create variable and connection string but how do I bind that variable to Excel Connection manger.
    Please help.
    Thank you so much in advance.
    Ex: SOX_CAM_SQL_Report _020215.csv
           SOX_CAM_SQL_Report _030215.csv
    --Similar issue:
    https://social.msdn.microsoft.com/Forums/en-US/bda433aa-c8f8-47c9-9e56-efd20b8354ac/creating-a-dynamic-excel-file?forum=sqlintegrationservices
    Suggestion in the above posted but where can bind this to Excel Connection Manger. 
    Please help provide step by step.  Thanks.
    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\\temp\\" + "ExcelTarget" + (DT_WSTR,4)DATEPART("yyyy",GETDATE())  +
    ".xls" + ";Extended Properties=\"EXCEL 8.0;HDR=YES\";"
    And yes, as you were intimating, the delay validation on the dataflow should be set.

    Hi NguyenBL,
    According to your description, you created ssis package to export data from database to excel, when the package runs, you want to create new excel and name the file with time stamp. If that is the case, we can achieve the goal by following steps:
    Create a script task used to create excel files.
    Create a data flow task to export data from database to excel.
    Add OLE DB source to data flow task.
    Add Excel Destination to data flow task.
    Create connection manager for OLE DB and Excel.
    Click Excel Connection Manager, in Properties window, click (…) button next to Expressions, then set ExcelFilePath with expression like below:
    "C:\\ETL Lab\\CreateNewExcel\\ExportData_"+REPLACE((DT_STR, 20, 1252)(DT_DBTIMESTAMP)@[System::StartTime], ":", "")+".xls"
    For detail information, please refer to the document:
    https://sqljourney.wordpress.com/2013/01/12/ssis-create-new-excel-file-dynamically-to-export-data/
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    Wendy Fu
    TechNet Community Support

  • Creating Query with dynamic columns to show results

    Hi experts,
    I need to know how to create a query with dynamic columns. Meaning, I don't want to create a query with fixed columns representing the 12 periods of the fiscal year to show me actuals as the fiscal year proceeds.
    For example, if I am currently in the middle of period 3 (March) of a fiscal year, when I execute the query, I need it to automatically only show me the 'Actuals' for periods 1 and 2, without seeing the columns from periods 3 to 12 showing blank.
    Then when I am in the middle period 5 (May) the query should ONLY show me the columns for periods 1 to 4 'Actuals', no results should be shown for periods 5 to 12 yet, and I don't want to even see blank columns for period 6 to 12.
    How do I define my columns, to achieve this.
    Maximum points will be awarded.
    Thanks Everyone.

    Hi Josh,
    I'm having a little difficuluty understanding what should be included in my restricted key figures.
    The time characteristics that I have available to use are:
    0FISCPER3 (posting period)
    0FISCYEAR (fiscal year), currently using SAP EXIT to default current fiscal year.
    0FISCVARNT (fiscal year variant).
    In addition, I have the following characteristics available to be used in the columns:
    Value type (10)
    version (currently I'm using variable for it)
    Currency type (020)
    Currency (USD).
    Can you explain what my restricted key figure should be based on and how it should look.
    I tried to create a restircted key figure using 0AMOUNT, and 0FISCPER3. For 0FISCPER3  I created a range from 1 to previous period (using SAP EXIT that supplied previous period).I also had value type, version, currency type, and currency included in that restricted key figure.Then when I tried to drag 0FISCPER3 under the restricted key figure once again, it wouldn't let me, probably because I've already used 0FISCPER3 in the restricted key figure.
    Please let me know if my explanation is not clear.
    Your step by step help would be great.
    Thanks
    Edited by: Ehab Mansour on Sep 23, 2008 2:40 PM

  • Help with Dynamic Objects

    Hi All,
    New to Flex and wanted to get some help from the public.
    Basically, here's what I want to do.
    I have a tab navigator with multiple tabs. Each tab has a
    datagrid on it. When you click the tab, the grid should update to
    new data based on the tab clicked. That's no problem. The problem
    I'm running into is that because the data is taking a while to
    retreive from the server, users are getting the previous's tabs
    datagrid until the information is updated. I wanted to do two
    things:
    1) Change the cursor to a "thinking" or "processing" icon
    where clicks can't be done until the full data has been retreived
    and updated. This is a nice to have; i haven't the slightlest clue
    on how to accomplish this.
    2) In lieu/addition to #1, i wanted the datagrid to be
    dynamic. Meaning, if you go to the tab, it'll add dynamically the
    datagrid to the tab and then show the data.
    Here's my code, but it doesn't work very well. Any help i can
    get from you guys would be great:
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="horizontal" initialize="createDataGrid()">
    <mx:Script>
    <![CDATA[
    import mx.controls.DataGrid;
    import mx.managers.PopUpManager;
    import mx.collections.ArrayCollection;
    import mx.controls.Alert;
    import mx.rpc.events.ResultEvent;
    import mx.containers.HBox;
    import mx.containers.TabNavigator;
    [Bindable]
    private var infoDataGrid:ArrayCollection;
    [Bindable]
    private var currentID:String;
    [Bindable]
    private var dynDataGrid:DataGrid;
    private function createDataGrid():void {
    dynDataGrid = new DataGrid;
    dynDataGrid.dataProvider=infoDataGrid;
    dynDataGrid.width=80;
    private function getDataFromServer(event:ResultEvent):void {
    var numOfRecords:int = event.result.result_set.num_rows;
    if (numOfRecords > 0 ) {
    infoDataGrid = event.result.result_set.results.result as
    ArrayCollection;
    } else {
    // no information retrieved worry about this later
    private function mainBuilder( event:Event ):void {
    var tabNavigator:TabNavigator = TabNavigator( event.target
    var pattern:RegExp = /\D/gi;
    if (tabNavigator.selectedChild.id != "NewTab") {
    // Remove all non-digits from LID
    var str:String = tabNavigator.selectedChild.id;
    currentID=(str.replace(pattern, ""));
    phpHTTPService.send();
    // loop through all children and remove any datagrids while
    adding to the current one
    for (y=0; y<tabNavigator.numChildren; y++) {
    var tmpNavID:String = tabNavigator.childDescriptors[y].id
    if ((tmpNavID == tabNavigator.selectedChild.id) &&
    (tmpNavID != "")) {
    // this does not work as intended...
    tabNavigator.selectedChild.addChild(dynDataGrid);
    } else {
    // this does not work.
    //How do you access something directly with an ID but
    represented by a variable?
    // tmpNavID.removeChildAt(0);
    } else {
    // New Tab selected, do something here
    ]]>
    </mx:Script>
    <mx:HTTPService id="phpHTTPService"
    url="/flex/php/AssetsInLocation.php" useProxy="false" method="GET"
    result="getDataFromServer(event)">
    <mx:request xmlns="">
    <lid>{currentID}</lid>
    </mx:request>
    </mx:HTTPService>
    <mx:TabNavigator id="tabNav"
    creationComplete="tabNav.selectedIndex=0;mainBuilder(event)"
    width="100%" change="mainBuilder(event);">
    <mx:HBox id="LID2345" label="Tab 1" width="100%"
    height="100%" horizontalAlign="center">
    <!-- <mx:DataGrid dataProvider="{infoDataGrid}"
    width="80%"/> -->
    </mx:HBox>
    <mx:HBox id="LID1111" label="Tab 2" width="100%"
    height="100%" horizontalAlign="center">
    <!-- <mx:DataGrid dataProvider="{infoDataGrid}"
    width="80%"/> -->
    </mx:HBox>
    <mx:HBox id="LID1234" label="Tab 3" width="100%"
    height="100%" horizontalAlign="center">
    <!-- <mx:DataGrid dataProvider="{infoDataGrid}"
    width="80%"/> -->
    </mx:HBox>
    <mx:Canvas id="NewTab" label="New..." width="100%"
    height="100%">
    </mx:Canvas>
    </mx:TabNavigator>
    </mx:Application>
    Thanks all for your assistance.

    I think Ned is on the right track, but the specific form of
    the command may be off. If the ProgressEvent handler is defined on
    MC_Holder_Image, then the command to get the
    MC_Holder_Preload_TextField object should be something like:
    var oTextField:TextField =
    this.parent.parent.MC_Holder_Preload.getChildByName(childname);
    oTextField.text = "some text";
    The first "parent" references MC_Holder_Sprite, the second
    MC_Holder. If there are several instances of MC_Holder_Preload,
    then the above would have to be modified to account for that by
    first using the getChildByName method to acquire the appropriate
    instance like so:
    var oMC:MovieClip =
    this.parent.parent.getChildByName(HolderPreloadName);
    var oTextField:TextField = oMC.getChildByName(TextFieldName);
    Hope this (a) makes sense, (b) helps and (c) actually works.
    Regards
    Dave Spaar

  • Help with dynamic playlist for mpd

    Hi guys,
    I use mpd with sonata for playing my music, and after trying exaile there is one thing id really like for mpd, and that is the dynamic playlist function.
    When you're playing a song in exaile with dynamic playlist enabled, it queries audioscrobbler and automatically adds similar artists/songs to your playlist (if you have them on your pc).
    I dont want to use exaile as it just feels too big and slow and bloated (not KISS ), i know a little bit of python so i thought i'll try and make my own little script/program as Sonata has audioscrobbler support, but i dont think there is anyway to query similar artists.
    I think im going to try and make this as a daemon type program that will run in the background adding songs to the playlist.
    Ive found the code from the exaile source (audioscrobbler.py) which queries lastfm e.g.
    >>> lips = AudioScrobblerQuery(artist='The Flaming Lips')
    >>> for artist in lips.similar():
    ... print artist.name, artist.mbid
    This will print a list of similar artists to the flaming lips.
    I've not done much with python so i thought this would be a good way to try and improve.
    Does anyone have any suggestions as to what the best way to go about searching and comparing the results to my mpd database, would the best way just to be to search the mpd.db?
    And if anyone else has any ideas/comments id like to hear them.
    Edit:
    I just found this too, so i may only need to change some things to integrate it with mpd rather than amarok
    http://www.kde-apps.org/content/show.php?content=31920
    Thanks
    Last edited by Kane (2008-06-05 13:24:33)

    well i just modified the patch into a little script, it does what i need
    its here if anyone wants it
    import audioscrobbler
    import mpd
    import random
    import time
    lastsong = {}
    def timer_control():
    get_similar()
    time.sleep(10)
    timer_control()
    def get_similar():
    audioscrobbler
    client = mpd.MPDClient()
    client.connect("localhost", 6600)
    mpdstatus = client.status()
    prevsonginfo = client.currentsong()
    global lastsong
    if mpdstatus['state'] == "stop": return
    if prevsonginfo == lastsong: return
    lastsong = prevsonginfo
    similarartists = ""
    song = prevsonginfo
    #if not song: break #No song, do nothing
    prevartist = song['artist']
    # Is the info already cached?
    similar_cache = {}
    if similar_cache.has_key(prevartist):
    similarartists = similar_cache[prevartist]
    else:
    #Not cached so fetch from Audioscrobbler
    try:
    similarartists = [artist.name for artist in audioscrobbler.AudioScrobblerQuery(artist=prevartist).similar()]
    # Cache search results and save some time next search
    similar_cache[prevartist] = similarartists
    except audioscrobbler.AudioScrobblerError:
    similar_cache[prevartist] = None # Empty cache
    return # Do nothing!
    if not similarartists: return # Empty list
    # Split list in half and sort upper half
    # this means good matches will have priority
    # but makes sure artist A does not always result in artist B
    half_idx = len(similarartists)/2
    upperhalf = similarartists[:half_idx]
    lowerhalf = similarartists[half_idx:]
    random.shuffle(upperhalf)
    artistlist = upperhalf
    artistlist.extend(lowerhalf)
    # Try each artist in order
    for artist in artistlist:
    try:
    print "Trying:",artist
    songs = client.search("artist", artist)
    if not songs: continue
    selected_song = random.sample(songs, 1)[0]
    client.add(selected_song['file'])
    print "Added", selected_song['title'],"by",selected_song['artist']
    # Delete old song from playlist?
    break
    except mpd.MPDError, e:
    print "MPDError", e.message
    continue
    except ValueError, e:
    print "ValueError:",e.message
    continue
    timer_control()
    Last edited by Kane (2008-06-06 16:22:49)

  • Creating dynamically JTree from database values

    Hi,
    I have a local database with some node values. I receive these values from database as a String[].
    short example:
    String[] Values = {"mainNode","Processors","mainNode","RAM","mainNode","Monitors",
    "Processors","INTEL","Processors","AMD","RAM","Kingston","RAM","GoodRAM",
    "Kingston","400MHz","Kingston","433MHz"}First value is higher node, second is a child.
    I'd like to produce dynamically JTree from Values[] like below:
    MainNode
    |----Processors
          |----INTEL
          |----AMD
    |----RAM
          |----Kingston
                |----400MHz
                |----433MHz
          |----GoodRam
    |----MonitorsI can't build up any working and fast solution :(
    Can anyone help me ?
    Please for any advices (samples) which will help me to apply it.
    Dearly regards!

    This is a relatively straight forward task but it smacks of being homework so unless you post what you have already done you are unlikely to be given any code.
    As a hint -
    Go through the data creating a Map between the parent value and a child DefaultMutableTreeNode which contains as user object the child String.
    When you extract a parent String from the data lookup the parent DefaultMutableTreeNode in the map and add the child DefaultMutableTreeNode to the parent DefaultMutableTreeNode.
    Note - All the map is doing is giving you a quick way of looking up a DefaultMutableTreeNode given a parent name.
    Note - that your tree will have problems if the same value appears in two or more branches!

  • How to log in with user credentials from database table

    Hello all.
    I have a table named users_1 in my database. This table has columns named username, password, email and userid. On userid, I have put a sequence.
    Now, I have manually made 1 row in this table, with in it the user credentials.
    How can I edit my application so that I can use these credentials to log onto the application?
    Please, a step-by-step text would make me rather happy, instead of getting a link with information that I should read. I've read most of it, and it just doesn't make any sense to me, so I prefer a guide-trough.
    Thanks..

    Hi Magali,
    You want only user from database can access your application.
    follow the steps given below.
    Step1  :  create function to authenticate users
    create or replace FUNCTION  "CUSTOM_AUTHENTICATE" (p_username in VARCHAR2, p_password in VARCHAR2)
    return BOOLEAN
    is
      l_password varchar2(4000);
      l_stored_password varchar2(4000);
      l_count number;
    begin
    select count(*) into l_count from users_1 where upper(username) = upper(p_username);
    if l_count > 0 then
       select upper(password) into l_stored_password from users_1 where upper(username) = upper(p_username);
       l_password :=  upper(p_password);
        if l_password = l_stored_password then
          return true;
        else
          return false;
        end if;
    else
      return false;
    end if;
    end;
    Step2  : create authentication scheme for your application
    Go to Application Builder->select your application->shared component->security->authentication scheme->create
    a) custom scheme : Based on a pre-configured scheme from the gallery
    b) give some name to your scheme like custom_scheme or something
    c)scheme type : database account
    d) verify function name = return CUSTOM_AUTHENTICATE
    e) go to = Login Page
    f) Logout url = f?p=&APP_ID.:101 // here 101 is login page no..so you can set your login page no.
    step3  : make this scheme as current scheme
    select your scheme and click make current
    now try to login into your application from your database users..
    Hope this will helps you,
    Thanks,
    Jitendra

  • How to call a SP with dynamic columns and output results into a .csv file via SSIS

    hi Folks, I have a challenging question here. I've created a SP called dbo.ResultsWithDynamicColumns and take one parameter of CONVERT(DATE,GETDATE()), the uniqueness of this SP is that the result does not have fixed columns as it's based on sales from previous
    days. For example, Previous day, customers have purchased 20 products but today , 30 products have been purchased.
    Right now, on SSMS, I am able to execute this SP when supplying  a parameter.  What I want to achieve here is to automate this process and send the result as a .csv file and SFTP to a server. 
    SFTP part is kinda easy as I can call WinSCP with proper script to handle it.  How to export the result of a dynamic SP to a .CSV file? 
    I've tried
    EXEC xp_cmdshell ' BCP " EXEC xxxx.[dbo].[ResultsWithDynamicColumns ]  @dateFrom = ''2014-01-21''"   queryout  "c:\path\xxxx.dat" -T -c'
    SSMS gives the following error as Error = [Microsoft][SQL Server Native Client 10.0]BCP host-files must contain at least one column
    any ideas?
    thanks
    Hui
    --Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

    Hey Jakub, thanks and I did see the #temp table issue in our 2008R2.  I finally figured it out in a different way... I manage to modify this dynamic SP to output results into
    a physical table. This table will be dropped and recreated everytime when SP gets executed... After that, I used a SSIS pkg to output this table
    to a file destination which is .csv.  
     The downside is that if this table structure ever gets changed, this SSIS pkg will fail or not fully reflecting the whole table. However, this won't happen often
    and I can live with that at this moment. 
    Thanks
    --Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

  • Help with Moving Emails from Exchange Server 2013

    Hi Team,
    Help, I need a solution on how to copy incoming and outgoing emails together with their attachments and was hoping someone could help with a solution I need to find for this problem.
    1) I have a need to copy all incoming and outgoing emails & attachments from Exchange Server 2013 mailboxes on a daily basis, so they can be archived into an external 3rd party database overnight.
    I believe that the first step is that I can set up another Exchange mailbox, through Journaling to receive these emails. 
    Is there any way that these emails can then be moved direct from the Journaling mailbox that I have created, to a shared folder on the network? If so what format would they be sent out as e.g. .msg, .ems and what is the process?
    Failing that, could they be sent to an Outlook client (not another Exchange mailbox) on the network and stored in a .pst file? (I have a program that will export them from .pst)
    I would really appreciate any assistance that you can provide in this matter.
    Regards, Greg.

    Hi,
    You can set auto-forward on journaling mailbox and auto-forward emails to another mailbox. Why don’t directly archive the emails from the journaling mailbox “an external
    3rd party database”.
    Thanks,
    Simon Wu
    TechNet Community Support

Maybe you are looking for

  • How can I plug my guitar and record on garageband with my mac retina display?

    I keep pluggin it but it won't read it, and the audio settings have no options...

  • Sound advice from BT's business partner Lithium

    I was curious about who and what is behind our new forums, so popped over to the Lithium site and wandered around a bit. BT seem to have chosen a partner who has a good pedigree in online communities. A Lithium Guru, one PaulGi, has some great advice

  • Floating Date and Time icon is gone in Leopard

    This may seem like a trivial matter, but under Tiger I was able to have the date and time "Calendar and Clock" Icon on the desktop. It was handy to look at quickly for reference. Under Leopard, I can't seem to get it back. I can have date and time in

  • Photoshop Disables GPU Enhancements

    For some reason, when starting up Photoshop (CS 4) on my intel iMac, it says the following: "Photoshop has encountered a problem with the display driver, and has temporarily disabled GPU enhancements. Check the video card manufacturer's website for t

  • Apeture Version 3.2.2 not keeping my photo edits?

    When I edit photos on Apeture Version 3.2.2, the changes are saved within the application but then are lost when I attempt to upload them in a WordPress gallery. I can view them in a photo viewer and also within emails with the edits appearing as I h