2 messages in com.mysql.lists.win32RE: Newbie using ADO & VB with mysql
FromSent OnAttachments
Roderick Thompson08 Jun 2002 10:14 
jbon...@sola.com.au10 Jun 2002 16:24 
Subject:RE: Newbie using ADO & VB with mysql
From:jbon...@sola.com.au (jbon@sola.com.au)
Date:06/10/2002 04:24:22 PM
List:com.mysql.lists.win32

I didn't know you could do that. I only ever use qualified names inside the query and use aliases to separate duplicately named fields. Something like this

SELECT Table1.ID as Tab1ID, Table2.ID as Tab2ID FROM Table1, Table2 WHERE ...

By the way I hope you do not routinely use queries like SELECT * FROM Table1, Table2 Either your tables are very small or you do not care about efficiency.

John Bonnett

-----Original Message----- From: Roderick Thompson [mailto:rode@cebrasoft.co.uk] Sent: Sunday, 9 June 2002 2:45 AM To: win@lists.mysql.com Subject: Newbie using ADO & VB with mysql

Hi

I'm currently in the process of moving an Access Database over to MySQL (4.0 Alpha) and have been able to convert the SQL statements over without any problem.

Where the problem occurs is in referencing field names where I have selected from more than one table.

For example if I do "SELECT * FROM Table1, Table2", with Access & SQL Server I can read duplicate field names as rs("Table1.ID") and rs("Table2.ID") but this does not seem to work with MySQL. I get an error that it was not able to find the field.

What am I doing wrong ?

Thanks.