Show Progress Bar while Accessing data from Server

Hi,
I need a Progress bar to be displayed when my application triggers database to backup, As the data would be large progress bar makes sense to display the time span.
I need a progress bar in place to show the progress of the task,
Can anyone suggest me how to do this? This should be shown when i backup my database from WPF.
I have code written for server side and just need a progress bar and timer.
Thanks,
Shreyas M

You could use a BackgroundWorker. There is a complete code sample available on MSDN here:
https://msdn.microsoft.com/en-us/library/cc221403(v=vs.95).aspx. You do the long-running work, i.e. the actual backup, in the DoWork event handler.
Note that you will need to report the progress (by calling the ReportProgress method of the BackgroundWorker) and calculate the total time it will take to complete the backup operation yourself.
It might be easier to just display some "waiting" element and no progress bar during the time it takes for the operation to complete:
<!-- replace this with any element like for example an Image -->
<TextBlock x:Name="loadingElement" Visibility="Collapsed">please wait...</TextBlock>
loadingElement.Visibility = System.Windows.Visibility.Visible;
System.Threading.Tasks.Task.Factory.StartNew(() =>
//call your backup method here (this code is being run on a background thread....
.ContinueWith((t) =>
loadingElement.Visibility = System.Windows.Visibility.Collapsed;
}, System.Threading.CancellationToken.None, TaskContinuationOptions.None, TaskScheduler.FromCurrentSynchronizationContext());
After all you probably don't know how long time it will take for the method to complete, right? If you want to display a ProgressBar, the backup method should report the progress somehow. If you just call a method and wait for it to complete, you have no
idea of how long time it will take for the method to return. You will then have to estimate the actual time and then increase the value of the progress bar accordingly.
There is no way to find out before hand exactly how long time it will take until a method returns so it is the responsibility of the (backup) method to report to the caller how long time it needs and how long time is left until it is done. Far from all API:s
support reporting progress.
As you see in the BackgroundWorker example on MSDN, you could call the ReportProgress once in each iteration of a loop but if there is no loop in your Backup method you better just display a busy indicator without a progress bar since you don't know anything
about the progress anyway.
Edit: You could of course also display a ProgressBar element with its IsIndeterminate set to True. Just replace the TextBlock and use the sample code above:
<ProgressBar x:Name="loadingElement" IsIndeterminate="True" Height="50"/>
Setting this property to true is useful when you don't know how long time the operation will take: 
https://msdn.microsoft.com/en-us/library/system.windows.controls.progressbar.isindeterminate(v=vs.110).aspx
Hope that helps.
Please remember to mark helpful posts as answer to close your threads and then start a new thread if you have a new question. Please don't ask several questions in the same thread.

Similar Messages

  • Show Progress Bar while only on Page Load.

    Hi Experts,
    I want to show progress bar every time when page loads.
    Progress bar is coming on the page. but it is not going off after page is loaded.
    Below is the code which i added for the Progress bar.
    //written on Header Text of Page
    <script type="text/javascript">
    <!--
    function html_Submit_Progress(pThis){
    $x_Show('AjaxLoading');
    window.setTimeout('$s("AjaxLoading",$x("AjaxLoading").innerHTML)', 100);
    //-->
    </script>
    //written on footer text of Page
    <style> #AjaxLoading{padding:5px;font-size:18px;width:200px;text-align:center;left:20%;top:20%;position:absolute;border:0px solid #666;}
    </style>
    <div id="AjaxLoading" style="display:none;"><br /><img src="#APP_IMAGES#progress_bar.gif" id="wait" /></div>
    //called the function Execute on Page Loads 
    html_Submit_Progress(this);Progress bar is continuously showing on the page after page is loaded.
    I want only to show only page loads.
    Please help me .
    Apex Version : Apex 4.1
    DB Version : 10g
    Regards,
    Jitendra

    Hide the loader element when the page has loaded. Put this in the javascript section
    $(document).ready(function(){ $x_Hide('AjaxLoading'); });Or put it in the page load section
    $x_Hide('AjaxLoading');Or create a dynamic action which fires on page load, select a hide action, and use a jQuery selector to target '#AjaxLoading' as an affected element.

  • Progress bar while downloading data

    I want a progress bar showing while I'm downloading data. This seems like a simple thing but I can't figure it out. If I show() the progress bar before and/or during the download it becomes a blank frame. I should probably use a thread, but I don't know the best way to go about it. Any suggestions?

    Any suggestions?Maybe try looking at the javadocs?:
    http://java.sun.com/j2se/1.4.2/docs/api/javax/swing/JProgressBar.html
    which would have led you here:
    http://java.sun.com/docs/books/tutorial/uiswing/components/progress.html

  • Progress bar while calling reports from Forms

    I have got a form (FORMS 6i) which calls a report (Reports 6i). This call results in the invocation
    of a reports engine which might take time (may be more than a minute) in bringing up the desired report. Is there any way i can show a progress bar to the user (like in any Windows application) that the report is getting generated? Because the user is currently confused on whether the report is really generated or not while waiting for the report.
    Thanks in advance
    PRS

    I have got a form (FORMS 6i) which calls a report (Reports 6i). This call results in the invocation
    of a reports engine which might take time (may be more than a minute) in bringing up the desired report. Is there any way i can show a progress bar to the user (like in any Windows application) that the report is getting generated? Because the user is currently confused on whether the report is really generated or not while waiting for the report.
    Thanks in advance
    PRS

  • Show progress bar while module loads

    I have a TabView where each tab is a module. One of the
    modules has a lot of child components and when I click to activate
    that tab - it takes 2-3 seconds to load. During this time OSX shows
    the beach ball.
    Is it possible for me to show a loading progress bar instead?
    Should I be pre-loading all the modules when the application loads,
    or at some other point? If so, how do I do this?
    Any suggestions would be appreciated.

    Hey Jason,
    I'm not sure who moderates, but I can send you in the right
    direction.
    Short answer: Look around for Asynchronous Flex demos
    Long answer:
    The interfaces locks up (beach ball/hour glass) because the
    main application 'thread' is busy with the task you asked of it.
    This can, in many different languages, cause a freeze. Javascript,
    Native Mac or Windows applications, apparently Flex too.
    Running one task at a time is considered a synchronous
    (serial) request. What you need to do is make an asynchronous
    (parallel) request. In the web world, that's the 'A' in Ajax. By
    making asynchronous requests, you free up the main 'thread', while
    a separate worker thread is off completing the task. This keeps
    your interface responsive.
    I think that leads to event listeners.. Send off a background
    request, but listen for it to complete. Link the listener to a
    second piece of code upon successful completion.
    I wish I could get into more detail, but I'm not a Flex guy..
    hoped that at least helped gel the idea.
    -dp

  • Show progress bar while executing scp command in linux

    I am being trying to execute scp command throug java frames, I want to know is there any way to show progress when i am copying a file to another system.
    The scp command shows the progress in command prompt can i implement that on the jprogressbar.
    thanx in advance.

    I am being trying to execute scp command throug java frames, I want to know is there any way to show progress when i am copying a file to another system.
    The scp command shows the progress in command prompt can i implement that on the jprogressbar.
    thanx in advance.

  • Error while accessing data from MS Access DB through Window AD architec

    Dear Members,
    Iam having a BO 3.0 installation on a standalone PC with the basic tomcat and mysql setup... As a test environment, Now while designing universes i can easily connect to Oracle EBS structure also SQL server DB ... the problem is when iam linking to a MS Access DB through a network drive (its all ok in the designer) but while in Webi while runnning the query, it throws an error of (WIS 10901 .... database error DSN not specified)
    I have configured ODBC properly also given appropriate rights for the users and strangely the same universe is running well with my thick client desktop and webi rich client
    (so iam sure its not a odbc issue)
    Looking forward for any comments on this problem

    possibly the account running the webi report server doesn't have access to the drive. Is it local system? Try using the same account you are logged into the webi rich client as, but you will most likely need to grant that account local admin on the server so it can run the service.
    Regards,
    Tim

  • Date format error while accessing date from SQLSERVER

    Hi all, in me webdynpro application I have taken Date type for the Input Field.
    At date select it is displaying in the format
      *2/14/2009 i.e. mm/dd/yyyy*
    And when I am saving date in the sql database then the date format changes to..
    2009-02-14 i.e..yyyy/mm/dd.
    But using the Date format method I have changed the format as per the need to push date in the SQL database table...
    In the table SQL the date attribute is in form i.e.    02/14/2009 as like from the date select from the date Input Fieldu2026But the problem is that database is not being able to display in that Input field again.
    I have use the coding both at Insertion and selection of the database i.e..
    Date Sdate, Edate;
    Sdate     =   Date.valueOf (rs.getString ("Sdate"));
    Edate     =   Date.valueOf (rs.getString ("Edate"));
    SimpleDateFormat date Formatter = new SimpleDateFormat ("MM/dd/yyyy");
    Sdate = wdContext.currentProjectElement ().getEdate ();
    Edate = wdContext.currentProjectElement ().getEdate ();
      String Sd = dateFormatter.format (Sdate);
      String Ed = dateFormatter.format (Edate);
      Date Sdd =Date.valueOf (Sd);
      Date Edd =Date.valueOf (Ed);
    But at selection of the database the error for the date format isu2026.
    java.lang.IllegalArgumentException
    If somebody knows how to resolve this ,plz let me know
    Regards:
    SK

    for displaying the value only, I think, you are converting to string.
    sol1:
    1. Create a simple type in dictionary: under Dictionary -> Local Dictionary -> Simple Types
    2. go to Definition tab: Change Built-in Type as Date
    3. go to Representation tab: specify format e.g.: MM/dd/yyyy
    4. go to Context and change the date context attribute to the created type.
    sol2:
    please try to minimize the casting between Date and String.
    I believe in database date is stored as Date type itself. My suggestion will be for displaying keep a separate attribute and set it on each db call.
    below code is converting from Date to String.
    Date Sdate, Edate;
    Sdate = rs.getDate ("Sdate");
    Edate = rs.getDate ("Edate");
    SimpleDateFormat date Formatter = new SimpleDateFormat ("MM/dd/yyyy");
    String Sd = dateFormatter.format (Sdate);
    String Ed = dateFormatter.format (Edate);

  • Error while loading data from application server

    Hi all,
    Am facing a problem while loading data from application server.
    The error i get is ....
    *" The argument ' Rental/Lease ' cannot be interpreted as a number while assigning character to application structure*.
    'Rental/Lease' is a value for a character infoobject length 30. I checked for the sequence of fields in data source and the sequnce of values am receiving in application server and the sequence match.
    when i copy these values into a CSV onto a desktop and load,load is successful.
    Please let me know your views.
    Thanks&Regards,
    Praveen

    It looks like the system is trying to convert Rental/Lease to a number format.   Is the info object type CHAR or NUMC or ???  I would look there.
    Also, make  sure / is in RSKC.
    Brian

  • Dump while downloading data from Application Server File in 4.6 system

    Hi,
    When we are trying to upload data from Application Server to internal table using dataset statements, it is resulting in a dump. System we are using is 4.6c.
    When we faced similar kind of issue in ECC version, we have used the statement, Ignoring Conversion Errors.
    Please let me know how to handle this situation in 4.6 System.
    Thanks for your inputs.
    Regards,
    Phani

    Hi All,
    I am sorry. My question was wrong. It should be while uploading data from internal table to application server, if there are any special characters, it is going to dump.
    I will let you know the dump details and code at the earliesst.
    Sorry and Thanks again for your prompt response.
    Regards,
    Phani.

  • How to access ,Oracle 7.x,SQL server,MS access data from portal 3.0.7

    hi,
    i am sorry to repost it . but
    we r badly in need of accessing data from Oracle 7.x,SQL Server and access to Portal3.0.7 Applications.
    pl. help us.
    null

    Hi swati,
    1. for this u will also require help of basis team.
    2. these are the steps.
    a) make an entry in DBCON
    b) make connection string
    (on the physical application server,
    so that it can connect to secondary database)
    (this will be done by basis team,
    in which, they will specify the
    IP address of the secondary database server,
    the DATABASE ID, and the port number)
    c) then using open sql / native sql,
    we can use the secondary database connection,
    just like normal.
    d) if we use open sql,
    then there must be Y/Z table on
    sap as well as secondary database,
    and the field names , their type all should be identical.
    regards,
    amit m.

  • Error while loading data from a file on application server

    Hi all,
    Facing an error while loading data from a flat file.
    Error 'The argument '##yyyymmdd;@##' cannot be interpreted as a number ' while assigning character.
    I changed the format of date fields (tried with number,general,date(International))in the xls. But i still get the same error.Did check all the data types in Data source all the fields are dats.
    Can you please tell me what could be the problem?
    Thank you all,
    Praveen

    Hi all,
    As far as my first question i got through it but i had one more field in my flat file while actually is a time stamp, but in my flat file i have a data in this format
    10/21/2006  5:11:48 AM which i need to change to 10/21/2006
    one more note is i have some of the fields as NULL in this field
    Last Updated Date
    10/21/2006  5:11:48 AM
    10/21/2006  5:11:48 AM
    NULL
    NULL
    10/21/2006  5:11:48 AM
    NULL
    I want to display the values as 10/21/2006 and NULL as it is.
    Please let me know if we have a conversion routine in datasource which can solve my problem.
    Regards,
    Praveen

  • Accessing data from db table on another client on a separate server

    Hi
    We are trying to access data from a db table on client 400 NSQ with a program running on client 200 NSD. We are also trying to find the name of the table in which the connection configuration should be maintained. The two clients are on separate servers.
    Regards
    B.Garlipp
    Edited by: B.Garlipp on May 31, 2010 9:22 AM

    Create an RFC destination for NSQ system client 400 into your system where program is running (in this case NSD Client 200)
    Now in your program you can call function module RFC_READ_TABLE (with reference to this destination) to read entries from the other system.
    If you know ABAP, In fact you can create a Z RFC FM specific for this tables, so that you get the data in exact structure. This is because RFC_READ_TABLE returns data in text format with a delimiter.
    Cheers.
    Edited by: Rashid Javed on May 31, 2010 10:36 AM

  • Issue while accessing a SQL Server table over OTG

    Hi,
    I have been learning oracle for about 1.5 years and am just starting to learn some OTG pieces. I am wondering about an issue. The issue is:
    "We need help with an issue we are having while accessing a SQL Server table over OTG. We are getting the following error message in Oracle :
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Oracle][ODBC SQL Server Driver]Unicode conversion failed {HY000}
    The column it is failing on is "-----------" in the view --------------- in the SQL Server database pointed to by the Oracle DB Link ------------------- thats created in the Oracle instances ---- and -----.
    This was working before, but is now failing, we suspect its due to new multi-byte data being added to the base table in the above column."
    I took out the details and added ---- instead. I am wondering your guys thoughts on fixing this issue and helping me learn along the way. Thanks

    Hi Mike,
    Thanks for the response, here are the details:
    1. What is the character set of the Oracle RDBMS being used. What is returned by -
    select * from nls_database_parameters;
    NLS_CHARACTERSET
    AL32UTF8
    NLS_NCHAR_CHARACTERSET
    UTF8
    We get SQL_Latin1_General_CP1_C1_AS and 1252 as Collation Property and Code Page
    The datatype of the column in question in SQL Server is nvarchar(100).
    When I do a describe on the SQL Server view ( desc CK_DATA_FOR_OPL@------- ), I get the error below;
    ERROR: object CK_DATA_FOR_OPL does not exist
    Select * from CK_DATA_FOR_OPL@------ where rownum =1 does get me a row.
    create table tmp_tab as
    Select * from CK_DATA_FOR_OPL@----- where rownum =1;
    desc tmp_tab shows the datatype of the said column in the table created in Oracle as NVARCHAR2(150).
    Not sure why a column defined with size 100 in SQL Server should come across as 150 when seen over OTG. We see something similar in DB2 tables we access over OTG as well.
    Edited by: 993950 on Mar 15, 2013 8:49 AM

  • DB Connect Load - "Unknow error while uploading data from the DB Table"

    Hi Experts,
    We have our BI7 system connected to Oracle DB based third party tool. The loads are performing quite well in DEV environment.
    I would like to know, how we transport DB Connect datasources to Quality systems? Any different process to be followed for DB Connect datasources?
    At present the connections between BI Quality and the third party quality systems are established. We transported the DataSource from BI DEV system to BI quality system, but on trigerring an infopackage we are not able to perform loads. It prompts - "Unknow error while uploading data from the DB Table".
    Also on comparing the DataSources in DEV system and Quality system there are no fields in "Proposal" tab of datasource in Quality system. Also I cannot change or activate Datasource in Quality system as we dont have change access in quality.
    Please advice.
    Thanks,
    Abhijit

    Hi,
    Sorry for bumping an old thread ....
    Did this issue get ever get resolved?
    I am facing the same one. The loads work successfully in Dev. The transport for DBConnect DS also moved in successfully.
    One strange this is that DB User for dev did not automatically change to db user from quality when I transported the DBConnect datasource. DBCon DS still shows me the DB User from Dev in Quality system
    I get "Unknown Error" whenever I trigger the data package.
    Advait

Maybe you are looking for

  • Java Dialog Boxes Don't Stay Open and Automatically Close

    Hi I'm having this weird Java prob. Initially I thought it was a net beans problem but I found out all java apps have this problem on my pc. Dialog boxes automatically close after some time. Please help me resolve this issue. Windows 7 x64 Asus P8P67

  • This is a basic question!

    If I copy the link to my form I created and add it in my cover email, are respondents able to see everyone's responses when they submit the form?  I do not want anyone but myself to see any of the responses...how do I ensure that happens? Thank you!!

  • Using APEX_ITEM in pl/sql region

     

  • Using objects rather than jdbc resultset to fill reports

    Hi buddies! I�m developing a small sample of application that generates reports using values retrieved from objects. The idea is simple, I have an arraylist of objects and want to fill my report which these objects atributes. Jasper Project API has a

  • Issue on Installing HRMS

    Hello Experts, I am a newbie on HRMS.I have download 33 softwares which are under the Ebusiness suit from the oracle edivery sites of ver 12.1.1.and also have Microsoft Visual C++ 2005 and cygwin as the prerequisite. Issue: V15673-01_1of3.zip is not