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
Quotenames
-
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:
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;