Page 1 of 1
Quotenames
Posted: Mon 20 Jun 2011 11:44
by jlund
Hi
I am having trouble switching between SQL server and MySQL.
If I connect using MySQL, work on som tables, Close the connection, and then try to connect to at SQL server using the same TUniTable and TUniConnection, UniDac still uses the ` char to quote the table-, and fieldnames insted of [], and vice versa.
If I close the program and restart, there is no problem.
I am using SDac 3.00.0.2
TIA Jens Lund
Posted: Mon 20 Jun 2011 13:41
by AndreyZ
Hello,
Thank you for the information. We have reproduced the problem and the investigation of the problem is in progress. As soon as we resolve the problem, we will let you khow.
As a workaround, you can clear (or change to another value) the TUniTable.TableName property between connections to different database servers. Here is a code example:
Code: Select all
procedure TMainForm.BitBtn1Click(Sender: TObject);
begin
UniConnection.LoginPrompt := False;
UniTable.Connection := UniConnection;
UniTable.Options.QuoteNames := True;
UniConnection.ProviderName := 'SQL Server';
UniConnection.Server := 'server';
UniConnection.Database := 'database';
UniConnection.Username := 'username';
UniConnection.Password := 'password';
UniTable.TableName := 'test';
UniTable.Open;
UniConnection.Close;
UniConnection.ProviderName := 'MySQL';
UniConnection.Server := 'server';
UniConnection.Database := 'database';
UniConnection.Username := 'username';
UniConnection.Password := 'password';
UniTable.TableName := '';
UniTable.TableName := 'test';
UniTable.Open;
end;
Posted: Mon 20 Jun 2011 13:55
by jlund
Thank you very much for the swift reply
/Jens Lund
Posted: Thu 23 Jun 2011 13:24
by AndreyZ
We have fixed this problem. This fix will be included in the next UniDAC build.