---SPANISH---
Hola,
He cambiado de la version 5 a la version 6 con Delphi XE3 y tengo problemas con la conexión a la BD.
El problema consiste en que el nuevo driver me da un "connection_id" diferente para cada query.
Esto me provoca que todas las tablas temporales que uso con MySQL dejen de funcionar.
Esto no pasaba con el driver anterior.
---ENGLISH---
Hi,
I changed from version 5 to version 6 with Delphi XE3 and I have trouble connecting to the database.
The problem is that the new driver gives me a "connection_id" different for each query.
This causes malfunction in the temporary tables.
This problem was not produced with the previous driver.
Example:
// MysqlServer 5.5.15 Windows Server 2008 64 bits
SQLConnection.DriverName := 'DevartMySQLDirect';
SQLConnection.LibraryName := 'dbexpmda40.dll';
SQLConnection.VendorLib := 'not used';
SQLConnection.GetDriverFunc := 'getSQLDriverMySQLDirect';
SQLConnection.Params.Clear;
SQLConnection.Params.Add('User_Name=root');
SQLConnection.Params.Add('Password=mypass');
SQLConnection.Params.Add('HostName=localhost');
SQLConnection.Params.Add('Database=mysql');
SQLConnection.Open;
query.Close;
query.SQL.Text := ' select connection_id() as id';
query.Open;
showmessage('Conection 1 --> ' + query.FieldByName('id').AsString);
query.Close;
query.SQL.Text := ' select connection_id() as id';
query.Open;
showmessage('Conection 2 --> ' + query.FieldByName('id').AsString);
query.Close;
query.SQL.Text := ' CREATE TEMPORARY TABLE tmp (field1 int not null default 0)';
query.ExecSQL;
query.Close;
query.SQL.Text := ' Select * from tmp';
query.Open; // Error, tmp table doesn't exist
Error with temporary table
Re: Error with temporary table
Hi,
seems to be a closed connection after each execution.
What I see new in 6 is new threads opened and closed for each execution.
I hope this is related with my lost connection problem and solved both at the same time.
Best Regards,
Cristian Peta
seems to be a closed connection after each execution.
What I see new in 6 is new threads opened and closed for each execution.
I hope this is related with my lost connection problem and solved both at the same time.
Best Regards,
Cristian Peta
Re: Error with temporary table
Hello,
We have already fixed this problem. This fix will be included in the next dbExpress driver for MySQL build.
We have already fixed this problem. This fix will be included in the next dbExpress driver for MySQL build.
-
- Posts: 4
- Joined: Mon 12 Mar 2012 15:22
Re: Error with temporary table
Hello, I downloaded the 6.1.2 version of the driver and the error is fixed.
Thank you.
Thank you.
Re: Error with temporary table
Thank you for the confirmation. If any other questions come up, please contact us.