Forum Moderators: open
Ive just been done by the craziest bug ive come across in my 3 years of coding ASP websites and im wondering if anyone knows of whats caused my issue (its taken me 4 hours or so to figure the damn thing out!)....
Basically i have a stored proc calling from an asp page, which returns the dataset into a recordset called ors. this then loops through the data and concatenates a string with it..basic stuff.
The problem i had was that almost half of the data coming from the columns was blank! I could manaually run the stored proc on the SQL and see the data was there and correct, i could also see that half my data was showing as expected.
I knew there was no errors with my code as i never use error resume next.
Basically my bug has boiled down to the fact that i have to access each column of data in the exact order that it is output in the SQL...
so if the SQL responds Col1,Col2,Col3 i have to access that data in the exact same order!
Trying to write out Col3&" "&Col2&" "&Col1 would result in only the Col2 data being wrote to the screen as the other 2 are out of order.
Anyone ever come across this before or know what cocktail is needed to trigger the bug? Its really infuriated me and feel i need to know the cause of the issue heh. I cant find any info on this.
some other facts are using ors(0) instead of ors("col1") makes no difference. Dumping the data into a variable or array makes no difference.
The server runs Win Server 2003 R2 - SP2 with SQL Server 2005.
Cheers for reading my rant :-D
Again this isnt a cry for help as its all figured out - i just want to know what causes this :(
Basically boiled down to reading all the small fields first then the big ones last.
On a side note, my ADO version is 2.8 - you can google that statement to get the code to check ur version.
This is still driving me nuts! :(:(