License Public Domain
Lines 23
Keywords
ASQLite (1)
Permissions
Owner: tanto
Viewable by Everyone
Editable by All Siafoo Users
Hide
Free your code from a slow death on your hard drive Join Siafoo Now or Learn More

Execute ASQLite sql script Atom Feed 0

# 's
 1   Database:=TASQLite3DB.Create(nil);
2 Database.Database:=ExtractFileName(DBFileName);
3 Database.DefaultDir := ExtractFileDir(DBFileName);
4 Database.CharacterEncoding:='utf8';
5 Database.Open;
6
7...
8
9procedure TDM.ExecuteSQL(SQL: string);
10var
11 Query:TASQLite3Query;
12begin
13 Query:=TASQLite3Query.Create(nil);
14 try
15 Query.Connection:=Database;
16 Query.SQL.Clear();
17 Query.SQL.Add(SQL);
18 Database.StartTransaction;
19 Query.Open;
20 Query.Close;
21 finally
22 Database.Commit;
23 Query.Free;
24 end;
25end;