Apologises if the following sounds vague, but I’m stumped as to the reason.
My setup is classic ASP pages connecting to several SQL Server 2008 DBs with the exact same schema but different data in them.
My problem is that when I run my ASP script to create a report of the data in a database (simple queries with a bit of vbscript to add up certain stuff, concat a bit more string info, etc - the script runs and finishes in about 5 secs) the first execution of this script generates completely different data to when I run it a second, third, fourth, etc time and I have no idea why.
If I then run this same script on a different DB it gives me inaccurate data on the first run, but when I refresh the page the data returned is more to what I expect and will continue to do so.
I’ve looked at the code I just can’t understand why the first run would be different to subsequent ones when nothing changes!