MySQL Forums
Forum List  »  Connector/ODBC

ODBC to multiple databases
Posted by: pao
Date: October 07, 2004 02:43AM

Hi all,
The code below gives error when executing the sql, because ODBC can't connect to the second database (DB_ANA).

strConn = "driver={MYSQL ODBC 3.51 Driver}; "
strConn = strConn & " server=localhost;port=3306;Option=16834;
Database=db_cciaa;UID=ivmn;" 
Conn.Open strConn

sql = "SELECT SC.COGNOME, NA.VIA FROM DB_CCIAA.TB_SELEZIONATE AS SC LEFT JOIN DB_ANA.TB_ANA AS NA ON (SC.COD_FISCALE = NA.CF)"
set rsProva = conn.execute (sql)

It seems to me incredible that I couldn't execute a join between different databases in MySql, also because it isn't possible to create links to different databases as in Access I do...
Is there someone can give me some hints?

Options: ReplyQuote


Subject
Written By
Posted
ODBC to multiple databases
pao
October 07, 2004 02:43AM
October 07, 2004 08:52AM
pao
October 07, 2004 09:43AM
October 07, 2004 09:50AM
pao
October 07, 2004 10:21AM
October 07, 2004 10:38AM
pao
October 08, 2004 06:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.