USE `mysql` fails when Unidirectional?

USE `mysql` fails when Unidirectional?

Postby upscene » Mon 02 Jan 2006 11:22

Hi there,

I'm executing these (separately) in sequence:
use `mysql`
select * from user

on a connection WITHOUT selecting a database and execute them in a TMyQuery component.

If Unidirectional and ReadOnly are FALSE, this works fine. However, when these are TRUE, it fails with:

#3D000No database selected


Any idea why?

--
Martijn Tonies
Upscene Productions
upscene
 

Postby Ikar » Wed 04 Jan 2006 10:32

MyDAC automatically sets FetchAll to False after setting Unidirectional to True. To execute FetchAll = False statements MyDAC creates additional connections. As a result, for executing SELECT and USE statements two different connections to server are used.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby upscene » Wed 04 Jan 2006 10:35

But apparently only when executing a SELECT, cause the USE statement is executed in the primary connection??

--
Martijn Tonies
Upscene Productions
upscene
 

Postby Ikar » Wed 04 Jan 2006 14:39

Currently MyDAC doesn't use complicated algorithms to analyze necessity of creating additional connections. Now we do not have in plans to improve this behavior.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56


Return to MySQL Data Access Components