MySQL Forums
Forum List  »  Connector/ODBC

[MySQL][ODBC 5.1 Driver][mysqld-5.0.41-community-nt]No database selected
Posted by: manbrod manbrod
Date: August 19, 2015 01:35AM

Hi!
I'm trying to make a query to 2 different databases in one query.
Connection string:
"DRIVER={MySQL ODBC 5.1 Driver};SERVER=w2003;PORT=3305;UID=***;PWD=***;STMT=set character_set_results=cp1251;" - e.g. here is no DATABASE property defined.

cn=Con.Open() works fine. My query:

q="select * from `tc-db-main`.personal where ID IN

(select * from `tc-db-log`.logs where LOGTIME>TIMESTAMP('2015-08-19 07:50:00'))"

but after Recordset.Open(q,cn,2,3) i've got an error "No database selected".

So, my question - is it possible using ADO make a query to different databases in one query? I'm not sure but it seems to me that it is not possible...Am I wrong?

Options: ReplyQuote


Subject
Written By
Posted
[MySQL][ODBC 5.1 Driver][mysqld-5.0.41-community-nt]No database selected
August 19, 2015 01:35AM


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.