|
I'm flabbergasted !!?!
No really I am!
codito ergo sum
|
|
|
|
|
Version 1.0 probably used a DataAdapter to Fill a DataTable and then counted the Rows. This is an improvement.
|
|
|
|
|
using a Count(*) query is much simple n straightforward i suppose
Vikas Salvi
Programmer Analyst
|
|
|
|
|
And depending upon the database, count(ROWID) might be even better.
Chris Meech
I am Canadian. [heard in a local bar]
|
|
|
|
|
Well, yeah, but we have to save that for the next version... if anyone complains about performance that is. Or, if we're very lucky, we'll get to buy new servers to improve performance, and that makes us very happy.
|
|
|
|
|
The gay guy that rated your post with a 2, obviously didn't catch the sarcasm in it... Some things are too subtle I guess
Asynchronously daydreaming...
|
|
|
|
|
Gold Canyon, AZ ... where OpenSource means far too much of a reduction in profit margins!
|
|
|
|
|
Alright, who are you and how do you know where I live?
|
|
|
|
|
http://profiles.yahoo.com/piebaldconsult
|
|
|
|
|
Ah, yes. I do wish CP allowed more than simply "U.S.", it's a big damn country.
|
|
|
|
|
I was just poking to find out where my next resume should go, if one needs to be sent out.
|
|
|
|
|
We are looking to replace a developer who left recently.
|
|
|
|
|
Check the MFC docs for CRecordset. They specifically advise that the record count isn't known until you've scrolled to the last record and then recommend you do just that if you need the count. A colleague, many years ago, followed that advice. It worked fine on his test databases but when it hit the real world and a recordset containing 3 million records it didn't work quite so well. Interestingly enough, the customer put up with the shocking performance (> 40 minutes for a form refresh). Go figure!
|
|
|
|
|
Rob Manderson wrote: Interestingly enough, the customer put up with the shocking performance (> 40 minutes for a form refresh). Go figure!
Now that's the true WTF.
--
You have to explain to them [VB coders] what you mean by "typed". their first response is likely to be something like, "Of course my code is typed. Do you think i magically project it onto the screen with the power of my mind?" --- John Simmons / outlaw programmer
|
|
|
|
|
add a little spinny thing while it refreshes... they'll wait for hours
|
|
|
|
|
Of course a good way to speed that up was to use the MoveLast method after the recordset was opened. The count call would then be really responsive, but you'd be scratching your head over why was the count always 2.
Chris Meech
I am Canadian. [heard in a local bar]
|
|
|
|
|
Yes but it should not apply if the query uses "count(*)" becuase the sql server will do the "counting" and return 1 row with the result.
Mauro Leggieri.
|
|
|
|
|
It verifies whether SQLServer is doing a correct job or not.
|
|
|
|
|
The programmer should have done away with the where clause and check UserType in the while loop.....
|
|
|
|
|
Thats why I always be in work, people like that create work for everyone. Oh the inexperienced should be allowed to develop commercial code.
|
|
|
|
|
Did he use the wrong incantations?
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal. George Orwell, "Keep the Aspidistra Flying", Opening words
|
|
|
|
|
To get the count of items in your table, you would be using SQL's countof[^] (unless this is MySQL specific? )
|
|
|
|
|
Reminds me of one I saw.
To alphabetically sort the ASCII data in a table the moron read the relevant field into a fixed length string array and then he sorted the array.
And guess what the management did to him? He was promoted to team leader eventually! I kid you not.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
|
|
|
|
|
Ted Ferenc wrote: And guess what the management did to him? He was promoted to team leader eventually!
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->ßRÅhmmÃ<-·´¯`·.
|
|
|
|
|
The sad thing was the Software Manager, I was going to run a new branch the firm opened so they needed a team leader, my comment was make anybody team leader except him, even the cleaning lady would be a better choice. I did state that within 6 months he would have totally screwed up the work I had done in making the department function at least tolerably well.
In 6 months I was proved correct, what happened to him?
He left, as he was a team leader, he got a better team leaders job elsewhere!
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for - in order to get to the job you need to pay for the clothes and the car, and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
|
|
|
|