July 16, 2001 at 12:00 am
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/lplatt/aspandadogotchaduplicatefieldnamesinaquery.asp
August 8, 2001 at 5:59 am
That's wonderful, but what is the solution?
August 8, 2001 at 6:11 am
use a alias i suppose !!
August 9, 2001 at 3:42 pm
Is this article for real? You must be very new to ADO programming to just be hitting this.
August 11, 2001 at 9:35 pm
quote:
Is this article for real? You must be very new to ADO programming to just be hitting this.
That would be an incorrect assumption but thanks for the feedback anyway. The thing is, I probably never would have run across this if it wasn't for the cut and paste programming I happend to be doing at the time. Typically I would have written the sql statement by hand in which case I would have aliased the fields accordingly. Yes GRN - you are correct
quote:
use a alias i suppose !!
Although there are several solutions to this problem the best is to alias the rating as "Article Rating" and "Book Rating", thus no ambiguity. The purpose of this Tip was not to uncover some deep dark secret of ADO but rather to give other programmers something to think about when creating sql statements that return record sets in ADO.
August 14, 2001 at 5:06 am
I agree with Leon that this isn't so much about ADO as it is best practices. If you're aliasing your tables and cols correctly, you'll never see this. Just out of curiousity, can anyone tell me if this is a bug or a feature of ADO?
Andy
February 5, 2002 at 11:34 am
Once the Join is done, there are no P. and A. qualifiers anymore. You simply have to alias the fieldnames to something meaningful. I suppose it's considered a 'feature' since many times the identically named fields would have identical data (but then why return both?).
Student of SQL and Golf, Master of Neither
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply