Al T 12 Posted October 24, 2022 (edited) I found code on GitHub showing this... I'm wondering if it is a mistake or is it real? https://github.com/War3Evo/Delphi-Password-Manager/blob/master/DataModule.pas#L83 In advance, Thank you! If it does exists for Delphi, can you please point me to documentation for other data types for sqlite for Delphi, please? Edited October 24, 2022 by Al T Share this post Link to post
ertank 27 Posted October 24, 2022 (edited) Here is a link from official SQLite website https://www.sqlite.org/datatype3.html it says there is BLOB support. Here is another link from official SQLite website https://www.sqlite.org/changes.html you can find BLOB support is introduced with 2004-06-18 (3.0.0 alpha). Delphi already has TBlobField support https://docwiki.embarcadero.com/Libraries/Sydney/en/Data.DB.TBlobField Edited October 24, 2022 by ertank Share this post Link to post
Al T 12 Posted October 24, 2022 The code below is from another Delphi programmer whom owns Delphi Berlin: procedure TDM.FDConnectionAfterConnect(Sender: TObject); begin FDConnection.ExecSQL( 'CREATE TABLE IF NOT EXISTS ENTRY( '+ 'Title VARCHAR2(60) NOT NULL, '+ 'UserN VARCHAR2(40), '+ 'Passw CHAR(64) NOT NULL, '+ 'URLpa VARCHAR2(100), '+ 'NickN VARCHAR2(20), '+ 'CustN VARCHAR2(20), '+ 'Notes VARCHAR2(400), '+ 'DateC DATE, '+ 'Icon IMAGE)'); end; What I'm trying to figure out is if IMAGE is in Delphi or not. Also, there's a DATE datatype? Is that also from Delphi? I just wonder if Delphi has a Datatype that I can't seem to find on the Internet. SQLite 3 Delphi datatype IMAGE and DATE? Share this post Link to post
weirdo12 19 Posted October 25, 2022 (edited) What you might be wondering is how FireDAC interprets a column that is defined to have the data type IMAGE when that data is read from the database. IMAGE is not a SQLite data type. Quote SQLite provides developers with the freedom to store content in any desired format, regardless of the declared datatype of the column. Some people find this feature troublesome. Some developers are shocked to discover that it is possible to insert text into a column marked INTEGER. Have a look at this page: https://www.sqlite.org/flextypegood.html 7 hours ago, Al T said: The code below is from another Delphi programmer whom owns Delphi Berlin: procedure TDM.FDConnectionAfterConnect(Sender: TObject); begin FDConnection.ExecSQL( 'CREATE TABLE IF NOT EXISTS ENTRY( '+ 'Title VARCHAR2(60) NOT NULL, '+ 'UserN VARCHAR2(40), '+ 'Passw CHAR(64) NOT NULL, '+ 'URLpa VARCHAR2(100), '+ 'NickN VARCHAR2(20), '+ 'CustN VARCHAR2(20), '+ 'Notes VARCHAR2(400), '+ 'DateC DATE, '+ 'Icon IMAGE)'); end; What I'm trying to figure out is if IMAGE is in Delphi or not. Also, there's a DATE datatype? Is that also from Delphi? I just wonder if Delphi has a Datatype that I can't seem to find on the Internet. SQLite 3 Delphi datatype IMAGE and DATE? Edited October 25, 2022 by weirdo12 Share this post Link to post
Dmitry Arefiev 101 Posted October 25, 2022 https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_SQLite_with_FireDAC#SQLite_Data_Types 2 1 Share this post Link to post
Al T 12 Posted October 25, 2022 15 hours ago, Dmitry Arefiev said: https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Using_SQLite_with_FireDAC#SQLite_Data_Types I don't know why I couldn't find this with Bing nor Google? Anyhow, this is the documentation I was looking for! Share this post Link to post
skyzoframe[hun] 4 Posted November 9, 2022 CREATE DOMAIN IMAGE AS BLOB SUB_TYPE 0 SEGMENT SIZE 2048; After that, you can call your domain. You don't need to definite everything when creating your database table. I really like to use domains. 'CREATE TABLE IF NOT EXISTS ENTRY( '+ 'Title VARCHAR2(60) NOT NULL, '+ 'UserN VARCHAR2(40), '+ 'Passw CHAR(64) NOT NULL, '+ 'URLpa VARCHAR2(100), '+ 'NickN VARCHAR2(20), '+ 'CustN VARCHAR2(20), '+ 'Notes VARCHAR2(400), '+ 'DateC DATE, '+ 'Icon IMAGE)'); Share this post Link to post