Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

ASP and ADO Gotcha - Duplicate Field Names in a Query Expand / Collapse
Author
Message
Posted Monday, July 16, 2001 12:00 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Saturday, February 10, 2007 12:11 PM
Points: 91, Visits: 1
Comments posted to this topic are about the content posted at http://www.sqlservercentral.com/columnists/lplatt/aspandadogotchaduplicatefieldnamesinaquery.asp


Post #581
Posted Wednesday, August 8, 2001 5:59 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, October 5, 2004 5:41 AM
Points: 1, Visits: 1
That's wonderful, but what is the solution?


Post #20056
Posted Wednesday, August 8, 2001 6:11 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Thursday, June 8, 2006 2:26 AM
Points: 170, Visits: 1
use a alias i suppose !!




Post #20057
Posted Thursday, August 9, 2001 3:42 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, June 29, 2005 6:07 PM
Points: 1, Visits: 1
Is this article for real? You must be very new to ADO programming to just be hitting this.




Post #20058
Posted Saturday, August 11, 2001 9:35 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Saturday, February 10, 2007 12:11 PM
Points: 91, Visits: 1
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.



Post #20059
Posted Tuesday, August 14, 2001 5:06 AM
SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: Moderators
Last Login: Yesterday @ 7:46 AM
Points: 6,784, Visits: 1,898
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



Andy
SQLAndy - My Blog!
Connect with me on LinkedIn
Follow me on Twitter
Post #20060
Posted Tuesday, February 5, 2002 11:34 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, May 21, 2014 8:17 AM
Points: 297, Visits: 335
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
Post #20061
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse