Well you can make a "Smoke and mirrors" Progress Bar yourself, but remember,
that just as Jeff said, it will be just smoke and mirrors..... Here is the
way to do it, should you decide to:
1. Do a bunch of testing on your server to generate a simple data table
that can be used to roughly predict how long an Insert will tkae for this
query, as a function of the number of records it will update. It may be
linear,
Num Records Time
10 1 sec
20 2 Sec
100 10 sec
1000 100 sec
etc.
or it may expose a non-linear but obvious pattern. In any event, with
enough data points you will be able to use a statistical analysis tool (I've
forgotten the fancy words for this but it's something like "regression
Analysis" _ There's tons of info on the various methods and how to do them
in teh Excel help files, and Excel can do it for you) Anyway when you're
done you'll have a relatively simple predictor formula that should get
reasonably close to the right answer, based on the number of records that
the Update will affect.
2. Then in your client code, before you run the actual Update Query, run a
Select Count(*) From TableName Query With a Where Clause Condition that
matches exactly the Where Clause of the Update..... That should tell you how
many records the Update will affect......
3. Then, uding the formula you came up with in Step 1, and the count
generated in Step 2, calculate (Predict) how long the Update will run, and
construct and populate your progress bar based on the predicted completion
time and a timer.....
4. If you want to get fancy and deceptive, vary the rate at which it fills
up, in a quasi-random manner, and never let it go the last ten percent until
the query returns with a successfully completed message, and then wait an
extra few seconds as you fill the last ten percent up..... <grin>
Quote:
> > Ic... but is it possible if i just want to createe a Form that only show
> the
> > current processing Record No. (Or field value like PK value)? I guess
it's
> > possible right? But how can I get the the current field value from SQL
sp
> > and pass the parameter back to VB and how VB can get the returned
> parameter?
> I'll say it again: YOU CAN'T. Don't be fooled by the "progress bar" you
may
> have seen in MS Access. Access doesn't really know how far along the query
> is; it's just smoke and mirrors.
> If you are updating your records via a single SQL UPDATE statement then
SQL
> Server will report NO PROGRESS WHATSOEVER. Your only hope would be to
update
> each record manually via a recordset, and that would be way slower than an
> UPDATE statement. I realize users can get impatient, but it's better that
> the update take 4 minutes with no sign of progress than 30 minutes with
> feedback. 'Course that's just my opinion....