Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Anil Sharma
  Where is Anil Sharma?
 ludhiana
 India
 Anil Sharma
 To: subhankar pandey
  Where is subhankar pandey?
 Kolkata/Delhi
 India
 subhankar pandey
 Tags
Subject: RE: SQL Progress Bar
Thread ID: 209120 Message ID: 209316 # Views: 5 # Ratings: 0
Version: Visual FoxPro 6 Category: Databases, Tables and SQL Server
Date: Saturday, December 27, 2008 7:05:36 AM         
   


> MARCHOSO.OCX remember i send u once. second you can show the exact time of query too! its again tricky.
> > save the start time and end time of query in the table. and just before showing the query get the average duration or last duration from that table. I believe windows installation is also doing same internally they have fixed the time duration for each process and showing the balance duration according to it while installation of windows!.
> >
> >
> > Anil
> > My Blog

>
> Anil,
> I know the Marchoso.ocx to play animated gif.
> But question is how would I define start /end time?.
> Will u mean by this ?
>
>
> cStr=_ConnectionStr
> Select MyTable
> Append Blank
> Replace qStart with Time() in MyTable
> oConn = SQLSTRINGCONNECT(cStr)
> 	If oConn<0
> 		Messagebox("Could not connect to the Database at this time.",16,"Error")
> 		Return
> 	Else
> 	Sele MyTable
> 	Replace qEnd with Time() in MyTable
> 	Endif           
> 

> Then how to go for average time?not clear to me...
>
> regards
> subhankar





cStr=_ConnectionStr
Select MyTable
Append Blank
Replace qStart with DateTime() in MyTable  &&& use datetime field its easier to get time diff
oConn = SQLSTRINGCONNECT(cStr)
	If oConn<0
		Messagebox("Could not connect to the Database at this time.",16,"Error")
		Return
	Else
	Sele MyTable
	Replace qEnd with DateTime() in MyTable
	Endif           


SELECT AVG(DATETIME2-DATETIME1) As Time FROM MyTable into Cursor Junk
SELECT Junk
=MESSAGEBOX("Average Time is "+ALLTRIM(STR(Junk.Time)) + " Seconds",0+64,"Info")




*** Just calculate this average connection time just before making connection and show the tentative time.

Anil
My Blog

ENTIRE THREAD

SQL Progress Bar Posted by subhankar pandey @ 12/24/2008 12:01:14 PM
RE: SQL Progress Bar Posted by Koen Piller @ 12/24/2008 2:26:39 PM
RE: SQL Progress Bar Posted by mk sharma @ 12/30/2008 4:25:19 PM
RE: SQL Progress Bar Posted by Koen Piller @ 12/30/2008 4:38:20 PM
RE: SQL Progress Bar Posted by mk sharma @ 12/30/2008 4:40:37 PM
RE: SQL Progress Bar Posted by Koen Piller @ 1/2/2009 10:27:09 AM
RE: SQL Progress Bar Posted by Anil Sharma @ 12/25/2008 6:51:02 AM
RE: SQL Progress Bar Posted by Koen Piller @ 12/25/2008 9:34:55 AM
RE: SQL Progress Bar Posted by Anil Sharma @ 12/25/2008 10:37:53 AM
RE: SQL Progress Bar Posted by Koen Piller @ 12/25/2008 12:35:20 PM
RE: SQL Progress Bar Posted by Om Rajan @ 12/25/2008 12:48:16 PM
RE: SQL Progress Bar Posted by Koen Piller @ 12/25/2008 2:11:31 PM
RE: SQL Progress Bar Posted by Om Rajan @ 12/25/2008 7:09:49 PM
RE: SQL Progress Bar Posted by Mike Yearwood @ 12/28/2008 4:32:56 PM
RE: SQL Progress Bar Posted by Samir Ibrahim @ 12/25/2008 8:42:54 PM
RE: SQL Progress Bar Posted by Koen Piller @ 12/26/2008 8:58:46 AM
RE: SQL Progress Bar Posted by Samir Ibrahim @ 12/26/2008 9:46:11 AM
RE: SQL Progress Bar Posted by Mike Yearwood @ 12/28/2008 4:35:06 PM
RE: SQL Progress Bar Posted by Samir Ibrahim @ 12/29/2008 12:42:40 PM
RE: SQL Progress Bar Posted by Mike Yearwood @ 12/29/2008 7:51:01 PM
RE: SQL Progress Bar Posted by Samir Ibrahim @ 12/30/2008 10:39:16 AM
RE: SQL Progress Bar Posted by subhankar pandey @ 12/26/2008 10:55:35 AM
RE: SQL Progress Bar Posted by Anil Sharma @ 12/26/2008 11:09:52 AM
RE: SQL Progress Bar Posted by subhankar pandey @ 12/27/2008 5:55:11 AM
RE: SQL Progress Bar Posted by Anil Sharma @ 12/27/2008 7:05:36 AM
RE: SQL Progress Bar Posted by mk sharma @ 12/30/2008 4:22:36 PM
RE: SQL Progress Bar Posted by Anil Sharma @ 1/2/2009 8:03:43 AM
RE: SQL Progress Bar Posted by Mike Yearwood @ 12/30/2008 7:45:19 PM
RE: SQL Progress Bar Posted by subhankar pandey @ 1/7/2009 1:14:26 PM