Page 1 of 4 123 ... LastLast
Results 1 to 10 of 33

Thread: SQL feedback

  1. #1

    Default SQL feedback


    Does SQL server give feedback about the progress so it is will be possible to reflect or bind it with the progress bar?

  2. #2
    Maybe but not sure of it.

    Another trick is to retrieve first all primary keys (ID) of the resulting query.
    Then retrieve/update again the data basing on the ID set one by one thus can be bound to a progress bar.
    This is what MsAccess does for ODBC tables when updating, retrieving and showing data on screen.
    This way also one can paginate thus making display faster.

  3. #3
    Elite Member
    Join Date
    Aug 2008
    Posts
    1,053
    Blog Entries
    1
    you want to have a progress bar (WinForm) while retrieving/updating large datas?

  4. #4
    Quote Originally Posted by cold_fusion View Post
    Maybe but not sure of it.

    Another trick is to retrieve first all primary keys (ID) of the resulting query.
    Then retrieve/update again the data basing on the ID set one by one thus can be bound to a progress bar.
    This is what MsAccess does for ODBC tables when updating, retrieving and showing data on screen.
    This way also one can paginate thus making display faster.
    This sounds like a good idea, but I will be making more network traffic by reading twice, well I guess there will always be performance penalty when adding more features like a progress bar.

  5. #5
    Quote Originally Posted by MarkCuering View Post
    you want to have a progress bar (WinForm) while retrieving/updating large datas?
    I need a cross platform solution preferably Java to retrieve large data and showing progress while reading database. The progress bar status will be synchronize with sql select,insert.....

  6. #6
    if you mean return the current progress while the query is executing on sql server
    - i think there is no way, if you notice in sqlserver management studio while you are doing some huge select statements the management studio doesnt really returns the current progress of sql server but rather just a 'preloader' type of progress bar with no current progress on it.

    but if you mean display progress after the query has been executed and is now ready to return the
    results.


    heres what i usually do

    I get the total count of resulting query

    then do some

    Code:
    while (reader.read())
    {
    record++
     if(CurrentTickCountFunction() > tickcount + 1000)
     {
       tickcount = CurrentTickCountFunction()
       UpdateProgressBar(record)
     } 
      ... do some stuff
    }
    UpdateProgressBar(record)
    so basically the code will update the progress bar every 1 second (or what ever you like) while you are still reading the record.
    i prefer doing the tickcount technique rather than some modulo solution because it will always be constant on every computer regardless of its processing power.


    if you wont be able to get the total count, then you should consider a different progress bar where it displays the total record reads-to-Unknown

    usually i create the UpdateProgressBar() function as a delegate/ event so the form
    using your class can subscribe to that event

    below is a tool i created to upload images to Imageshack servers, which displays the current progress but its in c#
    RapidShare Webhosting + Webspace

    similar concept: Big Data + progress bar
    Last edited by silent-kill; 12-27-2008 at 08:00 AM.

  7. #7
    Quote Originally Posted by silent-kill View Post
    if you mean return the current progress while the query is executing on sql server
    This is what I mean, I know it is not possible, I just want to confirm coz I know you guys are smarter than me

  8. #8
    nice one silent kill...


    yeah! bling bling men...abz'

  9. #9
    @javapenguin

    bro, database has nothing to do with the progress status. all you need is to play it on the codes.

  10. #10
    Quote Originally Posted by dlanyer77 View Post
    @javapenguin

    bro, database has nothing to do with the progress status. all you need is to play it on the codes.
    so it is not possible to synchronize progress bar with database activity? I think cold_fusions suggestion is the nearest possible solution.

  11.    Advertisement

Page 1 of 4 123 ... LastLast

Similar Threads

 
  1. SQL 101
    By BadDudes in forum Programming
    Replies: 44
    Last Post: 08-31-2012, 07:34 AM
  2. SQL Quiz!
    By maldito_guapito in forum Programming
    Replies: 45
    Last Post: 01-24-2006, 01:01 PM
  3. wat's d best sql back-end?
    By edshark in forum Software & Games (Old)
    Replies: 5
    Last Post: 09-15-2005, 04:41 PM
  4. HOW TO CONNECT SQL SERVER USING SQL AUTHENTICATION
    By edshark in forum Software & Games (Old)
    Replies: 13
    Last Post: 09-02-2005, 04:53 PM
  5. feedback regarding Nokia 6230
    By eaglegeorge1 in forum Gizmos & Gadgets (Old)
    Replies: 10
    Last Post: 06-29-2005, 04:45 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
about us
We are the first Cebu Online Media.

iSTORYA.NET is Cebu's Biggest, Southern Philippines' Most Active, and the Philippines' Strongest Online Community!
follow us
#top