What is this code in SqlDBHowTo document? lazarus / 16-Databases ---------------------------------------------------------------------- dodgebros · 2020-12-10 18:52 Here is a code example from the Wiki document SqlDBHowTo: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure CreateTable;  var   Query : TSQLQuery;  begin  Query := CreateQuery(AConnection, ATransaction);  Query.SQL.Text := 'create table TBLNAMES (ID integer, NAME varchar(40));';  Query.ExecSQL;   Query.SQL.Text := 'insert into TBLNAMES (ID,NAME) values (1,''Name1'');';  Query.ExecSQL;    Query.SQL.Text := 'insert into TBLNAMES (ID,NAME) values (2,''Name2'');';  Query.ExecSQL;    Query.Close;  Query.Free;end;  What is "CreateQuery()" ? I tried copy/pasting this code into an app I am working on using SqLite as the database.  When I try to run it, it says it can't find "CreateQuery()".  Is it in a Unit I don't have listed in the interface uses section maybe? TD ---------------------------------------------------------------------- wp · 2020-12-10 19:06 I modified the sample. Please test it (I did not, but it should work). ---------------------------------------------------------------------- dodgebros · 2020-12-10 19:15 Hi wp.  I am afraid I don't follow you, where is it you revised the code that I might see it? Thanks, TD ---------------------------------------------------------------------- wp · 2020-12-10 20:52 Aren't you talking of this wiki article https://wiki.freepascal.org/Sq lDBHowto#How_to_execute_a_query_using_TSQLQuery.3F ? ---------------------------------------------------------------------- dodgebros · 2020-12-10 22:05 Sorry, yes I am.  I now see where you changed the document, thank you.  FYI, the document contains a second example that also uses the "CreateQuery(AConnection, ATransaction);" so you might want to revise that example also. Again, thank you your help with this! TD ---------------------------------------------------------------------- wp · 2020-12-10 22:27 Sorry... Fixed, too. ---------------------------------------------------------------------- cdbc · 2020-12-22 11:36 Hi Have a look at this. Regards Benny