Re: Problem with ADO and duplicate field name (ASP + VBScript)
From: William \(Bill\) Vaughn (billvaRemoveThis_at_nwlink.com)
Date: 07/23/04
- Next message: William \(Bill\) Vaughn: "Re: Microsoft Jet database engine"
- Previous message: Burton G. Wilkins: "HOW TO Avoid: "Cannot create a child list for field …." for SQL Re"
- In reply to: Pat: "Problem with ADO and duplicate field name (ASP + VBScript)"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 22 Jul 2004 19:53:08 -0700
Yet another reason not to use SELECT *.
The most efficient and most flexible way to select columns is to specify the
columns specifically.
SELECT A.AU_ID AS AuthorID, TA.AU_ID AS AnotherAUID
FROM Authors A, Title_Author TA
WHERE A.AU_ID = TA.AU_ID
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
"Pat" <pistonep@hotmail.com> wrote in message
news:f00959bb.0407221044.ba9abb1@posting.google.com...
> Hi all,
> first thank god to find such existing newsgroup :). I am a poor
> lonesome C++ coder who want to code a personnal ASP project with ADO
> and a simple Access Database
> I use a basic statement :
> "SELECT * FROM OBJECT,SECTION"
> and the Table OBJECT and the table SECTION both contains field named :
> "Label"
> When i try to get field value using :
> Response.Write("OBJECT.Label") I get an error :(.. I know that it
> comes from the duplicate name but i just can t find an easy way to
> solve it (i dont want to use alias cuz it s here just an example, my
> table are far much complicated)
> Could someone tell me how to do such thing? what the correst ASP . ADO
> syntax to retrieve th correct values ?
> Thanks in advance
> Patrice Pistone
- Next message: William \(Bill\) Vaughn: "Re: Microsoft Jet database engine"
- Previous message: Burton G. Wilkins: "HOW TO Avoid: "Cannot create a child list for field …." for SQL Re"
- In reply to: Pat: "Problem with ADO and duplicate field name (ASP + VBScript)"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|