ZeosLib and Delphi XE7 - new database
Posted: 11.01.2017, 02:20
I'm attempting to set up an app that starts up when the user first activates the software. The first task is to create the system's database. Bluntly - I'm getting no where. The database is MySQL5.5
As far as I can figure I'm doing what needs to be done. But nothing happens.
I'm using a ZConnection component.
Autocommit is off. The hostname is LocalHost - because the first installation must be activated on the server PC. The user is "root" and their password is also "root". The MySQL libraries are being found no trouble.
The code is as follows:
with ZConnection1 do
begin
try
Connect;
Properties.Add('CreateNewDatabase=CREATE DATABASE' + QuotedStr('test1') + 'IF NOT EXISTS' + 'DEFAULT CHARACTER SET UTF8');
Commit;
except
Properties.Clear;
Connect;
end;
end;
No error is triggered. But no database is created either.
Any assistance would be appreciated.
Thanks
Alan
As far as I can figure I'm doing what needs to be done. But nothing happens.
I'm using a ZConnection component.
Autocommit is off. The hostname is LocalHost - because the first installation must be activated on the server PC. The user is "root" and their password is also "root". The MySQL libraries are being found no trouble.
The code is as follows:
with ZConnection1 do
begin
try
Connect;
Properties.Add('CreateNewDatabase=CREATE DATABASE' + QuotedStr('test1') + 'IF NOT EXISTS' + 'DEFAULT CHARACTER SET UTF8');
Commit;
except
Properties.Clear;
Connect;
end;
end;
No error is triggered. But no database is created either.
Any assistance would be appreciated.
Thanks
Alan