Re: Problem with ADO and duplicate field name (ASP + VBScript)

From: William \(Bill\) Vaughn (billvaRemoveThis_at_nwlink.com)
Date: 07/23/04


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


Relevant Pages

  • Re: Acesss Data in Word via VBA
    ... If you need only certain rows, it's probably fastest to specify those in the ... "Fiddling" with an Access query, then looking at the SQL-View can give you most ... You'll find information for setting up an ADO connection to an Access database ... This reply is posted in the Newsgroup; please post any follow question or reply ...
    (microsoft.public.office.developer.vba)
  • Re: submit an SQL querry within VB6 to an access database
    ... There are two possibilities: using DAO or ADO. ... choice to work with from VB6. ... you should specify if you want ... appropriate answer by posting to a more appropriate newsgroup. ...
    (microsoft.public.access.dataaccess.pages)
  • Re: How to Mimic Access Externally Linked Tables using ADO?
    ... > using SQL Server for efficiency reasons. ... > connection up programmatically using ADO or ADOX or some SQL Server API? ... >> newsgroup, but if you have a good reason to send me e-mail, you'll find ... ADO does not have a query engine. ...
    (microsoft.public.data.ado)
  • Re: Brand Spankin Newbie ADO.NET Question
    ... This posting is provided "AS IS" with no warranties, and confers no rights. ... > examples in my Apress book "ADO.NET and ADO Examples and Best Practices" ... > Microsoft MVP ... > Please reply only to the newsgroup so that others can benefit. ...
    (microsoft.public.vb.database.ado)
  • Re: Form data output
    ... > CSV file. ... Access to extract the data from Word or the text file (ADO or DAO ... reply in the newsgroup and not by e-mail :-) ...
    (microsoft.public.word.vba.userforms)