[SOLVED]SQLQuery1 create table errors out - what's wrong lazarus / 16-Databases ---------------------------------------------------------------------- What I can do · 2024-05-14 01:33 I think this is the way to create a table in Access file *.mdb OD:win10 compiler: Lazarus 3.2 Project create a new table in a test project 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  SQLQuery1.SQL.Text:=' CREATE TABLE Words' +      ' (w_IDX int NOT NULL UNIQUE, '+      '  w_Text varchar(80) Null, ' +      '  w_Phonix varchar(80) Null) ';  SQLQuery1.Open; alwas get error saying field not correct ---------------------------------------------------------------------- dsiders · 2024-05-14 02:08 Quote from: What I can do on May 14, 2024, 03:33:45 amI think this is the way to create a table in Access file *.mdb OD:win10 compiler: Lazarus 3.2 Project create a new table in a test project 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  SQLQuery1.SQL.Text:=' CREATE TABLE Words' +      ' (w_IDX int NOT NULL UNIQUE, '+      '  w_Text varchar(80) Null, ' +      '  w_Phonix varchar(80) Null) ';  SQLQuery1.Open; alwas get error saying field not correct Open is expecting to find a dataset. Your SQL DDL statement doesn't return one. Use ExecSql instead. https://lazarus- ccr.sourceforge.io/docs/fcl/sqldb/tcustomsqlquery.execsql.html ---------------------------------------------------------------------- Handoko · 2024-05-14 10:24 Here has a demo showing how to use SQL for creating, connecting, reading, adding, deleting and doing searching for SQLite: https://forum.lazarus.freepascal.org/index.php/topic,65185.msg496461.h tml#msg496461 For creating tables, ExecuteDirect can be used, which is easier than ExecSQL: https://docwiki.embarcadero.com/Libraries/Athens/en/Data.SqlExpr.TSQLC onnection.ExecuteDirect ---------------------------------------------------------------------- What I can do · 2024-05-14 11:44 Thank you, Handoko LOL, you don't know this but years ago I made a data base helper, where I can access any help info that I find. I paste into the data base and then use all the power of the DB Engine to sort, find, chop, etc.. You get the picture. I created a branch on the main tree called Handoko and man its getting BIG! you da man! ---------------------------------------------------------------------- What I can do · 2024-05-14 11:49 however I finally resolved my issue by [Run] (Clean up and build) I guess all my hard crashing messed something up so I now use this menu command after every hard crash. but today I found a new issue think I will post it as well. thanks again ---------------------------------------------------------------------- Handoko · 2024-05-14 12:20 Quote from: What I can do on May 14, 2024, 01:44:26 pm... I made a data base helper, where I can access any help info that I find. I paste into the data base and then use all the power of the DB Engine to sort, find, chop, etc.. Me too, wrote myself SideNote for storing text information that important to me. It is a stay on system tray program. This utility was written using Lazarus + TDbf. I already planned it to support images, spreadsheet files and URL links. I wanted to rewrite it to use SQLite but later I found myself busy had no time doing it. ---------------------------------------------------------------------- What I can do · 2024-05-14 12:29 LOL, Yours is like a big filing cabinet with drawers and well organized folders but mine is like a trach can where every thing is stacked on top of it's self. you rock!