Thread-safe FloatToSQLStr; StepAndReset -> func
This commit is contained in:
@@ -3,8 +3,7 @@ unit Main;
|
||||
interface
|
||||
|
||||
uses
|
||||
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
|
||||
Dialogs, StdCtrls, ExtCtrls;
|
||||
Windows, SysUtils, Classes, Controls, Forms, Dialogs, StdCtrls, ExtCtrls;
|
||||
|
||||
type
|
||||
TForm_Main = class(TForm)
|
||||
@@ -35,7 +34,8 @@ begin
|
||||
// Delete database if it already exists
|
||||
DeleteFile('artists.db');
|
||||
|
||||
// Create datatbase and fill it with example data
|
||||
// Create database and fill it with example data
|
||||
Screen.Cursor := crHourGlass;
|
||||
DB := TSQLite3Database.Create;
|
||||
try
|
||||
DB.Open('artists.db');
|
||||
@@ -163,8 +163,11 @@ begin
|
||||
finally
|
||||
Stmt.Free;
|
||||
end;
|
||||
|
||||
ShowMessage('Database created.');
|
||||
finally
|
||||
DB.Free;
|
||||
Screen.Cursor := crDefault;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ object Form_Main: TForm_Main
|
||||
ClientHeight = 396
|
||||
ClientWidth = 657
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.1'
|
||||
LCLVersion = '1.0.12.0'
|
||||
object Memo_Result: TMemo
|
||||
Left = 154
|
||||
Height = 396
|
||||
|
||||
@@ -42,7 +42,8 @@ begin
|
||||
// Delete database if it already exists
|
||||
DeleteFile('artists.db');
|
||||
|
||||
// Create datatbase and fill it with example data
|
||||
// Create database and fill it with example data
|
||||
Screen.Cursor := crHourGlass;
|
||||
DB := TSQLite3Database.Create;
|
||||
try
|
||||
DB.Open('artists.db');
|
||||
@@ -170,8 +171,11 @@ begin
|
||||
finally
|
||||
Stmt.Free;
|
||||
end;
|
||||
|
||||
ShowMessage('Database created.');
|
||||
finally
|
||||
DB.Free;
|
||||
Screen.Cursor := crDefault;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user