Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked
I type info into some labeledits and by pressing "Append to DB" button this code is executed (fdqGoser2 is a FDQuery) fdqGloser2.Open; fdqGloser2.Append; fdqGloser2.FieldByName('Graesk').AsString:= ledGræsk.Text; fdqGloser2.FieldByName('Dansk').AsString:= ledDansk.Text; fdqGloser2.FieldByName('Lektion').AsString:= ledLektion.Text; fdqGloser2.FieldByName('Note').AsString:= ledNote.Text; fdqGloser2.FieldByName('Kategori').AsString:= ledKategori.Text; fdqGloser2.FieldByName('Langenscheidt').AsString:= ledLangenscheidt.Text; fdqGloser2.FieldByName('Ordtype').AsString:= ledOrdtype.Text; fdqGloser2.FieldByName('Boejning').AsString:= ledBøjning.Text; fdqGloser2.FieldByName('Graesk_ren').AsString:= Trykløs_SmåBogstaver(fdqGloser2.FieldByName('Graesk').AsString); fdqGloser2.Post; [ here the error is triggered] I wonder if some kind of property i fdqGloser2 is set wrong. I think the only thing I have set i SQL ('SELECT * FROM Gloser2'). Any ideas? /Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Stephen Chrzanowski Sendt: 12. oktober 2018 19:47 Til: General Discussion of SQLite Database Emne: Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked FSCK is File System ChecK, so the equivalent in Windows Scandisk. Trace through the code to find out when exactly the SQLite is reporting the lock. Is it at a query, on opening, is it multi-thread or multi-application access? Is the query taking too long? If you're debugging and everything is working through the transactions, I'd look at how you're setting the timeout and maybe it isn't being passed through correctly. As mentioned, depending on the size of the DB, your AV may be holding on and doing a scan of the file that is much longer than the 5 seconds. Set breakpoints at every point where you do something with SQL, then first step-over the break point to validate that specific function isn't causing the lock, then resume until the next break point. When/if you do hit a break point that causes a lock, restart the app, then step-into the function and see where the lock is happening. Transactions may also cause some grief, but I defer to those with more experience on that. I know that there are blocks in play for writes, not 100% sure if you open a transaction if you'll get a locked message from another call. Another thing you could do is, again depending on the size of your database and memory constraints, is "backup" the database to memory, if you're only using a single-thread & single-application, this should be valid. For a short bit, turn off all your AV software, or, get an AV free OS up and running to test your application on. Disconnect your Ethernet if you're truly paranoid about getting a rogue application hitting your machine while you've got AV off. (Been there with Melissa Virus) Another option is start up a new application and just have it do some data massaging on a scrap database. SQLite Expert I think has a demo DB you can play with, or, just start from scratch with a single file, single table database. If your new application can do work without your AV having a problem, then I'd be looking at what exactly your code is doing. I'm sure there's a SQLite3 Northwind database here: https://github.com/jpwhite3/northwind-SQLite3 I use the free version of Berlin and Tokyo, and I've never had a lock issue that couldn't be explained by another process taking too long with the data. I typically write single-threaded applications, but sometimes there are multiple applications touching the database. (IE: SQLite Expert; sqlite3.exe, my applications, etc). I've only ever run into database locked issues is when my app is writing the data pretty quickly to the DB and SQLite Expert runs a query. I'll get a timeout somewhere, but its easily explained. Expanding the timeout on both applications usually fixes the locked issue. On Fri, Oct 12, 2018 at 1:20 PM Lars Frederiksen wrote: > Thank you for your response. To answer your questions: > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked
Thank you for your response. To answer your questions: Ryan: It's sad to see someone get dismayed with what is usually a flawless working system. It's not the database that's tricky, it's the reason the file is locked. This would be a problem with a string based file too. - I agree Ryan, but I get SO totally frustrated [and locked myself :-)] not being able to go on with my favorite hobby!!! Do you have it open in any DB manager or other CLI or such? - I have just tried SQLite Manager and in fact I am able to edit in the db through this program What's the actual path of the folder containing the file on your drive? - My database (called flashcard.db) is placed in a subfolder to %programdata% (c:\programdata\my name\flashcard_data This leaves other possible culprits as Windows Virtualization - Personally I do not know much about Windows Virtualization. I will try a search!! and possible other programs/processes on your machine locking the DB file. - I am totally empty about what kind of program that might be?? Thomas: Could the problem arise due to filesystem corruption? Have you tried an fsck? - no I have not tried an fsck [is this not a Linux prg that checks the files?] Chris: Close your application. Is there a xxx-journal file in the same directory as the database? (where xxx is the name of the database) Try deleting this file. - there is no such file in the database directory Best Regards Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Chris Locke Sendt: 12. oktober 2018 18:22 Til: SQLite mailing list Emne: Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked > Database is locked Close your application. Is there a xxx-journal file in the same directory as the database? (where xxx is the name of the database) Try deleting this file. Thanks, Chris On Fri, Oct 12, 2018 at 4:54 PM Thomas Kurz wrote: > >> Could the problem arise due to filesystem corruption? Have you tried an >> fsck? >> >> >> - Original Message - >> From: R Smith >> To: sqlite-users@mailinglists.sqlite.org < >> sqlite-users@mailinglists.sqlite.org> >> Sent: Friday, October 12, 2018, 17:35:28 >> Subject: [sqlite] error message: [FireDAC][Phys][SQLite] Database is >> locked >> >> On 2018/10/12 2:44 PM, Lars Frederiksen wrote: >> > I have tried that too! - I must admit that right now I am turning to a >> KISS solution: String-based database with functions and procedures in a >> class that handles the different jobs you do on a table. After all these >> old-fashioned DB's are not so picky :-) >> >> It's sad to see someone get dismayed with what is usually a flawless >> working system. >> It's not the database that's tricky, it's the reason the file is locked. >> This would be a problem with a string based file too. >> >> Reading the above, I'm no longer convinced it's your anti-virus' fault >> either. >> >> Using Delphi FireDAC quite a bit, I can promise you that its SQLite >> connectivity is working just fine, and while an Antivirus can lock a >> file for the time it takes to check it, unless your database is >> Gigabytes in size, that lock should be released within milliseconds, >> unless found to be unsafe - but then the log should speak of it (which I >> assume it doesn't). >> >> This leaves other possible culprits as Windows Virtualization and >> possible other programs/processes on your machine locking the DB file. >> Do you have it open in any DB manager or other CLI or such? >> What's the actual path of the folder containing the file on your drive? >> >> >> Cheers, >> Ryan >> >> ___ >> sqlite-users mailing list >> sqlite-users@mailinglists.sqlite.org >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >> >> ___ >> sqlite-users mailing list >> sqlite-users@mailinglists.sqlite.org >> http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users >> > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked
I have tried that too! - I must admit that right now I am turning to a KISS solution: String-based database with functions and procedures in a class that handles the different jobs you do on a table. After all these old-fashioned DB's are not so picky :-) -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Stephen Chrzanowski Sendt: 12. oktober 2018 14:37 Til: General Discussion of SQLite Database Emne: Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked How about moving the databases elsewhere? Sometimes applications are picky when it comes where files are being written to (IE: Program Files). On Fri, Oct 12, 2018 at 8:30 AM Lars Frederiksen wrote: > Setting the Busy Timeout (in FireDAC) to 5000 ms does not solve the > problem - unfortunately! > > -Oprindelig meddelelse- > Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] > På vegne af Stephen Chrzanowski > Sendt: 12. oktober 2018 14:25 > Til: General Discussion of SQLite Database > Emne: Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is > locked > > Change the timeout value on the connection to 5 seconds or so. The DB will > retry. The AV has its grip on it, doing a scan, and won't let anything > else touch it until its done. > > On Fri, Oct 12, 2018 at 3:11 AM Lars Frederiksen > wrote: > > > Hello, > > > > I have made (in Delphi) a program that writes to a sqlite database. This > is > > a simple stand-alone solution. Now something is blocking for the programs > > attempt to writing to the databse. There is a an error message: > > [FireDAC][Phys][SQLite] Database is locked. > > > > A friend of mine has analysed the scenario and tells me that BitDefender > is > > the Problem. In BitDefender "Application Access" I have given my program > > permission to "Work". > > > > Any solution on how to "tell" BitDefender that it is OK to make changes > in > > my database? (I have tried BitDefender support - but no ticket answer!) > > > > Maybe also somebody knows an antivirus/anti-malware solution which are > not > > so "hard" as BitDefender? (and with a userfriendly GUI). > > > > Thank you so much for any help. I am rather "desperate" for some help! > > > > Best Regards > > > > Lars > > > > > > > > > > > > ___ > > sqlite-users mailing list > > sqlite-users@mailinglists.sqlite.org > > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked
Setting the Busy Timeout (in FireDAC) to 5000 ms does not solve the problem - unfortunately! -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Stephen Chrzanowski Sendt: 12. oktober 2018 14:25 Til: General Discussion of SQLite Database Emne: Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked Change the timeout value on the connection to 5 seconds or so. The DB will retry. The AV has its grip on it, doing a scan, and won't let anything else touch it until its done. On Fri, Oct 12, 2018 at 3:11 AM Lars Frederiksen wrote: > Hello, > > I have made (in Delphi) a program that writes to a sqlite database. This is > a simple stand-alone solution. Now something is blocking for the programs > attempt to writing to the databse. There is a an error message: > [FireDAC][Phys][SQLite] Database is locked. > > A friend of mine has analysed the scenario and tells me that BitDefender is > the Problem. In BitDefender "Application Access" I have given my program > permission to "Work". > > Any solution on how to "tell" BitDefender that it is OK to make changes in > my database? (I have tried BitDefender support - but no ticket answer!) > > Maybe also somebody knows an antivirus/anti-malware solution which are not > so "hard" as BitDefender? (and with a userfriendly GUI). > > Thank you so much for any help. I am rather "desperate" for some help! > > Best Regards > > Lars > > > > > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users > ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked
That is: I have disabled ALL protecting parameters in BitDefender to find the culprit module - without luck. -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Radovan Antloga Sendt: 12. oktober 2018 10:10 Til: sqlite-users@mailinglists.sqlite.org Emne: Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked Try to change database name (extension). For example: mydb.sqlite mydb.sdb mydb.db3 I would use .sqlite extension and exclude that files from antivirus check. Regards Lars Frederiksen je 12.10.2018 ob 9:11 napisal: > Hello, > > I have made (in Delphi) a program that writes to a sqlite database. This is > a simple stand-alone solution. Now something is blocking for the programs > attempt to writing to the databse. There is a an error message: > [FireDAC][Phys][SQLite] Database is locked. > > A friend of mine has analysed the scenario and tells me that BitDefender is > the Problem. In BitDefender "Application Access" I have given my program > permission to "Work". > > Any solution on how to "tell" BitDefender that it is OK to make changes in > my database? (I have tried BitDefender support - but no ticket answer!) > > Maybe also somebody knows an antivirus/anti-malware solution which are not > so "hard" as BitDefender? (and with a userfriendly GUI). > > Thank you so much for any help. I am rather "desperate" for some help! > > Best Regards > > Lars > > > > > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked
I have tried this, unfortunately without any luck. I think the problem might be in the sqlite DB-system. I have disabled ALL protecting parameters to find the culprit module - without luck. My sqlite version is: SQLite version 3.19.3 2017-06-08 14:26:16 There might be a newer and better version without this error? /Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Radovan Antloga Sendt: 12. oktober 2018 10:10 Til: sqlite-users@mailinglists.sqlite.org Emne: Re: [sqlite] error message: [FireDAC][Phys][SQLite] Database is locked Try to change database name (extension). For example: mydb.sqlite mydb.sdb mydb.db3 I would use .sqlite extension and exclude that files from antivirus check. Regards Lars Frederiksen je 12.10.2018 ob 9:11 napisal: > Hello, > > I have made (in Delphi) a program that writes to a sqlite database. This is > a simple stand-alone solution. Now something is blocking for the programs > attempt to writing to the databse. There is a an error message: > [FireDAC][Phys][SQLite] Database is locked. > > A friend of mine has analysed the scenario and tells me that BitDefender is > the Problem. In BitDefender "Application Access" I have given my program > permission to "Work". > > Any solution on how to "tell" BitDefender that it is OK to make changes in > my database? (I have tried BitDefender support - but no ticket answer!) > > Maybe also somebody knows an antivirus/anti-malware solution which are not > so "hard" as BitDefender? (and with a userfriendly GUI). > > Thank you so much for any help. I am rather "desperate" for some help! > > Best Regards > > Lars > > > > > > ___ > sqlite-users mailing list > sqlite-users@mailinglists.sqlite.org > http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] error message: [FireDAC][Phys][SQLite] Database is locked
Hello, I have made (in Delphi) a program that writes to a sqlite database. This is a simple stand-alone solution. Now something is blocking for the programs attempt to writing to the databse. There is a an error message: [FireDAC][Phys][SQLite] Database is locked. A friend of mine has analysed the scenario and tells me that BitDefender is the Problem. In BitDefender "Application Access" I have given my program permission to "Work". Any solution on how to "tell" BitDefender that it is OK to make changes in my database? (I have tried BitDefender support - but no ticket answer!) Maybe also somebody knows an antivirus/anti-malware solution which are not so "hard" as BitDefender? (and with a userfriendly GUI). Thank you so much for any help. I am rather "desperate" for some help! Best Regards Lars ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Database locked problem
Hello, Delphi 10.2 - FireDAC - SQLite FDConnection1 - FDQuery - DataSource - DBGrid My DBGrid is is Showing words ("gloser") from my database with SQL = 'SELECT * FROM Gloser'. BUT When I fill out som editfields and want to append the data I get the error message: Database Locked In fact I had the same error some time ago where the solution was to put my databse in a C-drive root folder. But that is where the db is right now!! Please help! Best Regards Lars ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] How to get RecNo when clicking on a DBGrid?
Hello, I am using Delphi and FireDAC. I have som editfields in the upper region of a tabsheet and a DBGrid in the lower part. When I click on my DBGrid I would like to write the fields from the choosen Record to the editfields. I wonder if it is possible to get the RecNo of a record when clicking on a DBGrid in my program.?? An alternative solution could be putting the selected records in a stringgrid. I have a lot of trouble with these DataControls.!?! Best Regards Lars ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg
Hi Simon, PRAGMA Encoding gave me "utf-8" and the db gives me correct greek letters in my DBgrid in my Delphi program. So that is ok! BTW: ταβέρνα η - the last letter represents the definite article :-) I will read more about PRAGMA - here I am absolutely blank. PRAGMA is also used in the FireDAC components of my Delphi programming tool Thank you very much. /Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Simon Slavin Sendt: 13. august 2018 16:24 Til: SQLite mailing list Emne: Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg On 13 Aug 2018, at 1:45pm, Lars Frederiksen wrote: > This is the result: > > sqlite> Select GRAESK, hex(GRAESK), DANSK from gloser; > taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna "taverna" in greek should be "ταβέρνα". In UTF-8 I get CF84 CEB1 CEB2 CEAD CF81 CEBD CEB1 Examining what you show ... CF84 CEB1 CEB2 CEAD CF81 CEBD CEB1 20 CEB7 Which is the correct string with, for some reason, " η" on the end. So the encoding of your database should be UTF-8. It is possible that the contents of your database do not agree with the stated encoding of the database. Please execute the command PRAGMA encoding; in the shell tool and tell us what the result is. For details see <https://www.sqlite.org/pragma.html#pragma_encoding> if you get UTF-8, then the fault is entirely within Windows, and the database contains exactly what you would want. Simon. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg
Hi everybody, And thank you very much for your help. The problem is not a BIG issue for me because i primarily use the console program for creating databases. The unicode chrs are even inserted correct in the greek field, because I can read them correctly in my DBGrid of my Delphi program. I just think it is an odd "behavior" of the cmd, but never mind. I might try to experiment a little with codepages etc and see if this helps. Thank you! Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Hick Gunter Sendt: 13. august 2018 15:14 Til: 'SQLite mailing list' Emne: Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg It tells me (courtesy of findencoding.com) that the contents is encoded in one of - utf-8 (most probable) - iso-8859-10 - iso-8859-14 - iso-8859-16 - iso-20222-cn - iso-2022-cn-ext While your console is probably expecting either a windows or an incompatible ISO encoding. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Lars Frederiksen Gesendet: Montag, 13. August 2018 14:46 An: 'SQLite mailing list' Betreff: Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg Hi Hick Gunter, This is the result: sqlite> Select GRAESK, hex(GRAESK), DANSK from gloser; taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna de µ?? ?e?...|CEB4CEB520CEBCCEBFCF8520CEBBCEB5CF822E2E2E|sig mig engang. (egl "du fortæller mig ikke") d?µ?s?f?? ?/?|CEB4CEB7CEBCCEBFCF83CEB9CEBFCEB3CF81CEACCF86CEBFCF8220CEBF2FCEB7|journalist ???µa t?|CEBACEADCF81CEBCCEB120CF84CEBF|mønt, småmønt ??p??a ?|CEBACEBFCF80CEADCEBBCEB120CEB7|pige µa??t??a ?|CEBCCEB1CEB8CEAECF84CF81CEB9CEB120CEB7|elev, skoleelev (kvindelig) µa??t?? ?|CEBCCEB1CEB8CEB7CF84CEAECF8220CEBF|elev, skoleelev (mandlig) µp?? t?|CEBCCF80CEBFCF85CEBACEACCEBBCEB920CF84CEBF|flaske ?p??|CF8CCF80CF89CF82|(konj) som, ligesom, sådan som; eftersom p?t??? t?|CF80CEBFCF84CEAECF81CEB920CF84CEBF|glas (Både glas og flaske er intetkøn som vin. Øl er hunkøn) p.?.= pa?ade??µat?? |CF802ECF872E3D20CF80CEB1CF81CEB1CEB4CEB5CEAFCEB3CEBCCEB1CF84CEBFCF8220CF87CEACCF81CEB7|f.eks. (for eksempel) taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna de µ?? ?e?...|CEB4CEB520CEBCCEBFCF8520CEBBCEB5CF822E2E2E|sig mig engang. (egl "du fortæller mig ikke") d?µ?s?f?? ?/?|CEB4CEB7CEBCCEBFCF83CEB9CEBFCEB3CF81CEACCF86CEBFCF8220CEBF2FCEB7|journalist ???µa t?|CEBACEADCF81CEBCCEB120CF84CEBF|mønt, småmønt ??p??a ?|CEBACEBFCF80CEADCEBBCEB120CEB7|pige µa??t??a ?|CEBCCEB1CEB8CEAECF84CF81CEB9CEB120CEB7|elev, skoleelev (kvindelig) µa??t?? ?|CEBCCEB1CEB8CEB7CF84CEAECF8220CEBF|elev, skoleelev (mandlig) µp?? t?|CEBCCF80CEBFCF85CEBACEACCEBBCEB920CF84CEBF|flaske ?p??|CF8CCF80CF89CF82|(konj) som, ligesom, sådan som; eftersom p?t??? t?|CF80CEBFCF84CEAECF81CEB920CF84CEBF|glas (Både glas og flaske er intetkøn som vin. Øl er hunkøn) p.?.= pa?ade??µat?? |CF802ECF872E3D20CF80CEB1CF81CEB1CEB4CEB5CEAFCEB3CEBCCEB1CF84CEBFCF8220CF87CEACCF81CEB7|f.eks. (for eksempel) a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men sqlite> Does it tell you whats wrong? /Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Hick Gunter Sendt: 13. august 2018 14:34 Til: 'SQLite mailing list' Emne: Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg Select graesk, hex(graesk), dansk from gloser; Check the hex output to see if it conforms to UTF specs; if so, then your console is expecting a different encoding (probably ISO). If not, then your data was probably entered from a source the encodes in ISO. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Lars Frederiksen Gesendet: Montag, 13. August 2018 14:24 An: 'SQLite mailing list' Betreff: Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg Hi Hick Gunter, I do not know exactly what you mean by this (hex())? /Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Hick Gunter Sendt: 13. august 2018 14:07 Til: 'SQLite mailing list' Emne: Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg You need to show hex() before anyone
Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg
Hi Hick Gunter, This is the result: sqlite> Select GRAESK, hex(GRAESK), DANSK from gloser; taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna de µ?? ?e?...|CEB4CEB520CEBCCEBFCF8520CEBBCEB5CF822E2E2E|sig mig engang. (egl "du fortæller mig ikke") d?µ?s?f?? ?/?|CEB4CEB7CEBCCEBFCF83CEB9CEBFCEB3CF81CEACCF86CEBFCF8220CEBF2FCEB7|journalist ???µa t?|CEBACEADCF81CEBCCEB120CF84CEBF|mønt, småmønt ??p??a ?|CEBACEBFCF80CEADCEBBCEB120CEB7|pige µa??t??a ?|CEBCCEB1CEB8CEAECF84CF81CEB9CEB120CEB7|elev, skoleelev (kvindelig) µa??t?? ?|CEBCCEB1CEB8CEB7CF84CEAECF8220CEBF|elev, skoleelev (mandlig) µp?? t?|CEBCCF80CEBFCF85CEBACEACCEBBCEB920CF84CEBF|flaske ?p??|CF8CCF80CF89CF82|(konj) som, ligesom, sådan som; eftersom p?t??? t?|CF80CEBFCF84CEAECF81CEB920CF84CEBF|glas (Både glas og flaske er intetkøn som vin. Øl er hunkøn) p.?.= pa?ade??µat?? |CF802ECF872E3D20CF80CEB1CF81CEB1CEB4CEB5CEAFCEB3CEBCCEB1CF84CEBFCF8220CF87CEACCF81CEB7|f.eks. (for eksempel) taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna taß???a ?|CF84CEB1CEB2CEADCF81CEBDCEB120CEB7|taverna de µ?? ?e?...|CEB4CEB520CEBCCEBFCF8520CEBBCEB5CF822E2E2E|sig mig engang. (egl "du fortæller mig ikke") d?µ?s?f?? ?/?|CEB4CEB7CEBCCEBFCF83CEB9CEBFCEB3CF81CEACCF86CEBFCF8220CEBF2FCEB7|journalist ???µa t?|CEBACEADCF81CEBCCEB120CF84CEBF|mønt, småmønt ??p??a ?|CEBACEBFCF80CEADCEBBCEB120CEB7|pige µa??t??a ?|CEBCCEB1CEB8CEAECF84CF81CEB9CEB120CEB7|elev, skoleelev (kvindelig) µa??t?? ?|CEBCCEB1CEB8CEB7CF84CEAECF8220CEBF|elev, skoleelev (mandlig) µp?? t?|CEBCCF80CEBFCF85CEBACEACCEBBCEB920CF84CEBF|flaske ?p??|CF8CCF80CF89CF82|(konj) som, ligesom, sådan som; eftersom p?t??? t?|CF80CEBFCF84CEAECF81CEB920CF84CEBF|glas (Både glas og flaske er intetkøn som vin. Øl er hunkøn) p.?.= pa?ade??µat?? |CF802ECF872E3D20CF80CEB1CF81CEB1CEB4CEB5CEAFCEB3CEBCCEB1CF84CEBFCF8220CF87CEACCF81CEB7|f.eks. (for eksempel) a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men a???|CEB1CEBBCEBBCEAC|men sqlite> Does it tell you whats wrong? /Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Hick Gunter Sendt: 13. august 2018 14:34 Til: 'SQLite mailing list' Emne: Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg Select graesk, hex(graesk), dansk from gloser; Check the hex output to see if it conforms to UTF specs; if so, then your console is expecting a different encoding (probably ISO). If not, then your data was probably entered from a source the encodes in ISO. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Lars Frederiksen Gesendet: Montag, 13. August 2018 14:24 An: 'SQLite mailing list' Betreff: Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg Hi Hick Gunter, I do not know exactly what you mean by this (hex())? /Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Hick Gunter Sendt: 13. august 2018 14:07 Til: 'SQLite mailing list' Emne: Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg You need to show hex() before anyone can verify what encoding is stored. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Lars Frederiksen Gesendet: Montag, 13. August 2018 14:03 An: 'SQLite mailing list' Betreff: [EXTERNAL] Re: [sqlite] No unicode characters in sqlite3 console prg I use versio 3.19 Here is a print from cmd: SQLite version 3.19.3 2017-06-08 14:26:16 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> .open flashcard.db sqlite> select * from Gloser; 2|taß???a ?|taverna|[01_16] 3|taß???a ?|taverna|[01_16] 4|taß???a ?|taverna|[01_16] 5|taß???a ?|taverna|[01_16] 16|taß???a ?|taverna|[01_16] 17|taß???a ?|taverna|[01_16] 18|taß???a ?|taverna|[01_16] 19|de µ?? ?e?...|sig mig engang. (egl "du fortæller mig ikke")|[01_08] 20|d?µ?s?f?? ?/?|journalist|[01_08] 21|???µa t?|mønt, småmønt|[01_08] 22|??p??a ?|pige|[01_08] 23|µa??t??a ?|elev, skoleelev (kvindelig)|[01_08] 24|µa??t?? ?|elev, skoleelev (mandlig)|[01_08] 25|µp?? t?|flaske|[01_08] 26|?p??|(konj) som, ligesom, sådan som; eftersom|[01_08] 27|p?t??? t?|glas (Både glas og flaske er intetkøn som vin. Øl er 27|hunkøn)|[01_08] 28|p.?.= pa?ade??µat?? |f.eks. (for eksem
Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg
Hi Hick Gunter, I do not know exactly what you mean by this (hex())? /Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Hick Gunter Sendt: 13. august 2018 14:07 Til: 'SQLite mailing list' Emne: Re: [sqlite] [EXTERNAL] Re: No unicode characters in sqlite3 console prg You need to show hex() before anyone can verify what encoding is stored. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Lars Frederiksen Gesendet: Montag, 13. August 2018 14:03 An: 'SQLite mailing list' Betreff: [EXTERNAL] Re: [sqlite] No unicode characters in sqlite3 console prg I use versio 3.19 Here is a print from cmd: SQLite version 3.19.3 2017-06-08 14:26:16 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> .open flashcard.db sqlite> select * from Gloser; 2|taß???a ?|taverna|[01_16] 3|taß???a ?|taverna|[01_16] 4|taß???a ?|taverna|[01_16] 5|taß???a ?|taverna|[01_16] 16|taß???a ?|taverna|[01_16] 17|taß???a ?|taverna|[01_16] 18|taß???a ?|taverna|[01_16] 19|de µ?? ?e?...|sig mig engang. (egl "du fortæller mig ikke")|[01_08] 20|d?µ?s?f?? ?/?|journalist|[01_08] 21|???µa t?|mønt, småmønt|[01_08] 22|??p??a ?|pige|[01_08] 23|µa??t??a ?|elev, skoleelev (kvindelig)|[01_08] 24|µa??t?? ?|elev, skoleelev (mandlig)|[01_08] 25|µp?? t?|flaske|[01_08] 26|?p??|(konj) som, ligesom, sådan som; eftersom|[01_08] 27|p?t??? t?|glas (Både glas og flaske er intetkøn som vin. Øl er 27|hunkøn)|[01_08] 28|p.?.= pa?ade??µat?? |f.eks. (for eksempel)|[01_08] 29|taß???a ?|taverna|[01_16] 30|taß???a ?|taverna|[01_16] 31|de µ?? ?e?...|sig mig engang. (egl "du fortæller mig ikke")|[01_08] 32|d?µ?s?f?? ?/?|journalist|[01_08] 33|???µa t?|mønt, småmønt|[01_08] 34|??p??a ?|pige|[01_08] 35|µa??t??a ?|elev, skoleelev (kvindelig)|[01_08] 36|µa??t?? ?|elev, skoleelev (mandlig)|[01_08] 37|µp?? t?|flaske|[01_08] 38|?p??|(konj) som, ligesom, sådan som; eftersom|[01_08] 39|p?t??? t?|glas (Både glas og flaske er intetkøn som vin. Øl er 39|hunkøn)|[01_08] 40|p.?.= pa?ade??µat?? |f.eks. (for eksempel)|[01_08] 41|a???|men|[01_10] 42|a???|men|[01_10] 43|a???|men|[01_10] 44|a???|men|[01_10] 45|a???|men|[01_10] 46|a???|men|[01_10] 47|a???|men|[01_10] 48|a???|men|[01_10] The second field should show greek words but only the letters that are identical in danish and greek is shown. The pure greek letters like β, γ, δ, ε, η etc are shown as questionmarks. Do you want me to send you the database? Best Regards Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Rowan Worth Sendt: 13. august 2018 03:21 Til: SQLite mailing list Emne: Re: [sqlite] No unicode characters in sqlite3 console prg On 12 August 2018 at 00:51, Lars Frederiksen wrote: > Is this an error of my windows 10 cmd prompt or is it a general > problem that the sqlite3 console is not able to show unicode in the > cmd-window.?? > > No problem writing to the database and show (greek) unicode characters > in the cmd prompt as I key them, but when I want to show the data with > the SQL SELECT * FROM Gloser then the greek word is shown with most of > its letters as questionmarks. > What version of sqlite are you using? There was significant efforts to improve windows console unicode handling awhile back, which I think made it in for 3.12/3.13. If you're still seeing issues with a recent sqlite can you provide a short example which reproduces the issue? -Rowan ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0 May be privileged. May be confidential. Please delete if not the addressee. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] No unicode characters in sqlite3 console prg
Hi Simon, I use Windows 10 and have tried chcp 65001 without any luck. Still the same questionmarks /Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Simon Slavin Sendt: 13. august 2018 14:06 Til: SQLite mailing list Emne: Re: [sqlite] No unicode characters in sqlite3 console prg On 13 Aug 2018, at 1:03pm, Lars Frederiksen wrote: > I use versio 3.19 What operating system ? If you are using Windows, please issue this command before using sqlite3.exe: chcp 65001 Simon. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] No unicode characters in sqlite3 console prg
I use versio 3.19 Here is a print from cmd: SQLite version 3.19.3 2017-06-08 14:26:16 Enter ".help" for usage hints. Connected to a transient in-memory database. Use ".open FILENAME" to reopen on a persistent database. sqlite> .open flashcard.db sqlite> select * from Gloser; 2|taß???a ?|taverna|[01_16] 3|taß???a ?|taverna|[01_16] 4|taß???a ?|taverna|[01_16] 5|taß???a ?|taverna|[01_16] 16|taß???a ?|taverna|[01_16] 17|taß???a ?|taverna|[01_16] 18|taß???a ?|taverna|[01_16] 19|de µ?? ?e?...|sig mig engang. (egl "du fortæller mig ikke")|[01_08] 20|d?µ?s?f?? ?/?|journalist|[01_08] 21|???µa t?|mønt, småmønt|[01_08] 22|??p??a ?|pige|[01_08] 23|µa??t??a ?|elev, skoleelev (kvindelig)|[01_08] 24|µa??t?? ?|elev, skoleelev (mandlig)|[01_08] 25|µp?? t?|flaske|[01_08] 26|?p??|(konj) som, ligesom, sådan som; eftersom|[01_08] 27|p?t??? t?|glas (Både glas og flaske er intetkøn som vin. Øl er hunkøn)|[01_08] 28|p.?.= pa?ade??µat?? |f.eks. (for eksempel)|[01_08] 29|taß???a ?|taverna|[01_16] 30|taß???a ?|taverna|[01_16] 31|de µ?? ?e?...|sig mig engang. (egl "du fortæller mig ikke")|[01_08] 32|d?µ?s?f?? ?/?|journalist|[01_08] 33|???µa t?|mønt, småmønt|[01_08] 34|??p??a ?|pige|[01_08] 35|µa??t??a ?|elev, skoleelev (kvindelig)|[01_08] 36|µa??t?? ?|elev, skoleelev (mandlig)|[01_08] 37|µp?? t?|flaske|[01_08] 38|?p??|(konj) som, ligesom, sådan som; eftersom|[01_08] 39|p?t??? t?|glas (Både glas og flaske er intetkøn som vin. Øl er hunkøn)|[01_08] 40|p.?.= pa?ade??µat?? |f.eks. (for eksempel)|[01_08] 41|a???|men|[01_10] 42|a???|men|[01_10] 43|a???|men|[01_10] 44|a???|men|[01_10] 45|a???|men|[01_10] 46|a???|men|[01_10] 47|a???|men|[01_10] 48|a???|men|[01_10] The second field should show greek words but only the letters that are identical in danish and greek is shown. The pure greek letters like β, γ, δ, ε, η etc are shown as questionmarks. Do you want me to send you the database? Best Regards Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Rowan Worth Sendt: 13. august 2018 03:21 Til: SQLite mailing list Emne: Re: [sqlite] No unicode characters in sqlite3 console prg On 12 August 2018 at 00:51, Lars Frederiksen wrote: > Is this an error of my windows 10 cmd prompt or is it a general problem > that > the sqlite3 console is not able to show unicode in the cmd-window.?? > > No problem writing to the database and show (greek) unicode characters in > the cmd prompt as I key them, but when I want to show the data with the SQL > SELECT * FROM Gloser then the greek word is shown with most of its letters > as questionmarks. > What version of sqlite are you using? There was significant efforts to improve windows console unicode handling awhile back, which I think made it in for 3.12/3.13. If you're still seeing issues with a recent sqlite can you provide a short example which reproduces the issue? -Rowan ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] No unicode characters in sqlite3 console prg
Hello, Is this an error of my windows 10 cmd prompt or is it a general problem that the sqlite3 console is not able to show unicode in the cmd-window.?? No problem writing to the database and show (greek) unicode characters in the cmd prompt as I key them, but when I want to show the data with the SQL SELECT * FROM Gloser then the greek word is shown with most of its letters as questionmarks. It is not necessarily a problem as in my dbgrid of my program the unicode is shown correctly. I am just curious! Best Regards Lars ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [EXTERNAL] (no subject)
Hi Ryan, In the meantime I solved my unicode problem by simply setting FDConnection.StringFormat = unicode (I thought it was the default value but in my environment I have to choose it actively. (I could also solve the problem by choosing to use NVARCR instead of VARCHR) So here are my FDConnction1, fdqGloser (FDQuery) and dsGloser (DataSource): object FDConnection1: TFDConnection Params.Strings = ( 'Database=C:\SQLite\flashcard.db' // THIS WAS CHANGED... (read only problem solved) 'StringFormat=Unicode' // THIS WAS CHANGED... (unicode problem solved) 'DriverID=SQLite') LoginPrompt = False Left = 36 Top = 104 end object fdqGloser: TFDQuery Connection = FDConnection1 SQL.Strings = ( 'SELECT * FROM Gloser') Left = 116 Top = 104 end object dsGloser: TDataSource DataSet = fdqGloser Left = 196 Top = 104 end Thank you for the help so far. BR Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af R Smith Sendt: 10. august 2018 20:06 Til: sqlite-users@mailinglists.sqlite.org Emne: Re: [sqlite] [EXTERNAL] (no subject) On 2018/08/10 12:07 PM, Lars Frederiksen wrote: > In CMD I can write to my database without problems. Can you give me a hint > about what might be wrong with my OS-setup in Windows 10? > Thank you for the answer and your help! Much appreciated! Usually the FireDAC connections work fine out the box, especially for SQLite (though I suggest using your own latest DLL which can be downloaded from sqlite.org). There are 2 typical reasons why a file can have locking difficulty in Windows: 1 - Windows UAC is virtualizing the folder your DB is in (did you perhaps put it in the same folder as the exe? Or any other Windows-system folder?), or 2 - An over-zealous anti-virus is locking the file. Now I'm having difficulty believing it's 2, because the DB is not "Busy" or erroring out when opening, it's "Read-Only" which isn't an automatic switch for sqlite itself or via FireDAC. I'm also confident it's not 1 because the Windows UAC virtualization could move the file, could even redirect to a folder where the file doesn't exist, but I have never experienced it causing the file to open in read-only mode in sqlite. This leaves only the FireDAC component itself. Perhaps it has read-only mode set in either the properties or connection parameters - could you post for us your exact set-up of the FireDac connection? (Just say which controls you've used and their properties, view the form as text and copy it if needed). Just to be sure it isn't the UAC, try and connect to an sqlite DB or file in a safe location (such as your documents folder), see if you have any luck. These things usually work rather easy and straight-forward - so I'm betting it's something small that's perhaps not obvious. Cheers, Ryan ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [EXTERNAL] (no subject)
Hi, Right now I am not by my PC so I am not able to show you the settings in my FireDAC. Hovever I found some kind of solution to my problem before "closing down" yesterday: A few days ago I created my flashcard.db database in the sqlite console prg located in a folder named C:/SQLite/. From here it was copied to a folder where my program exe-file is placed when I develop. Using flashcard.db from this folder gave the mentioned error. After changing the connection link to C:/SQLite/ the error disappeared and I was able to write to the database. I have to find out why it works like that! UNICODE problem: Besides this problem I have another one being not able to show greek characters (unicode) when I insert records in the database. In the console cmd-prompt the greek characters shows like questionmarks. Best Regards Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af R Smith Sendt: 10. august 2018 20:06 Til: sqlite-users@mailinglists.sqlite.org Emne: Re: [sqlite] [EXTERNAL] (no subject) On 2018/08/10 12:07 PM, Lars Frederiksen wrote: > In CMD I can write to my database without problems. Can you give me a hint > about what might be wrong with my OS-setup in Windows 10? > Thank you for the answer and your help! Much appreciated! Usually the FireDAC connections work fine out the box, especially for SQLite (though I suggest using your own latest DLL which can be downloaded from sqlite.org). There are 2 typical reasons why a file can have locking difficulty in Windows: 1 - Windows UAC is virtualizing the folder your DB is in (did you perhaps put it in the same folder as the exe? Or any other Windows-system folder?), or 2 - An over-zealous anti-virus is locking the file. Now I'm having difficulty believing it's 2, because the DB is not "Busy" or erroring out when opening, it's "Read-Only" which isn't an automatic switch for sqlite itself or via FireDAC. I'm also confident it's not 1 because the Windows UAC virtualization could move the file, could even redirect to a folder where the file doesn't exist, but I have never experienced it causing the file to open in read-only mode in sqlite. This leaves only the FireDAC component itself. Perhaps it has read-only mode set in either the properties or connection parameters - could you post for us your exact set-up of the FireDac connection? (Just say which controls you've used and their properties, view the form as text and copy it if needed). Just to be sure it isn't the UAC, try and connect to an sqlite DB or file in a safe location (such as your documents folder), see if you have any luck. These things usually work rather easy and straight-forward - so I'm betting it's something small that's perhaps not obvious. Cheers, Ryan ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] [EXTERNAL] (no subject)
In CMD I can write to my database without problems. Can you give me a hint about what might be wrong with my OS-setup in Windows 10? Thank you for the answer and your help! Much appreciated! Best Regards Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Hick Gunter Sendt: 10. august 2018 11:55 Til: 'SQLite mailing list' Emne: Re: [sqlite] [EXTERNAL] (no subject) This sounds like a windows file access problem that is not letting your application access a file created in the context of a cmd box. Can you - from the sqlite shell - insert the desired record into the database? And select it afterwards? If so, then SQlite is working perfectly and it is your OS Setup that is in the way. If you can't write to the database from the SQLite shell, then maybe your are in a read-only directory. Try creating a temp table (which should default to an in-memory database) and iserting/selecting there. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Lars Frederiksen Gesendet: Freitag, 10. August 2018 11:42 An: 'SQLite mailing list' Betreff: [EXTERNAL] [sqlite] (no subject) Hi SQLite-users, I have in the console prg (cmd) created a small database in SQLite with only one table (just in order to check out SQLite). The Table is defined like this: CREATE TABLE IF NOT EXISTS "Gloser"( GRAESK VARCHAR(50) NULL, DANSK VARCHAR(50) NULL, LEKTION VARCHAR(10) NULL, NOTE TEXT NULL ); As a programming language I use Delphi 10.2 (GUI Object Pascal) and their FireDAC components for handling SQLite. When I (in my Delphi program) try to write to the database like this: fdqFlashCard.Append; fdqFlashCard.FieldByName('GRAESK').AsString:= 'græsk'; fdqFlashCard.FieldByName('DANSK').AsString:= 'dansk'; fdqFlashCard.FieldByName('LEKTION').AsString:= 'lektion'; fdqFlashCard.Post; Then I get this error: [FireDAC][Phys][SQLite]ERROR: Attempt to write a readonly database I have been searching without a result. Anybody with a helping hint? BR Lars ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ Gunter Hick | Software Engineer | Scientific Games International GmbH | Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 1 80100 - 0 May be privileged. May be confidential. Please delete if not the addressee. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] (no subject)
Hi SQLite-users, I have in the console prg (cmd) created a small database in SQLite with only one table (just in order to check out SQLite). The Table is defined like this: CREATE TABLE IF NOT EXISTS "Gloser"( GRAESK VARCHAR(50) NULL, DANSK VARCHAR(50) NULL, LEKTION VARCHAR(10) NULL, NOTE TEXT NULL ); As a programming language I use Delphi 10.2 (GUI Object Pascal) and their FireDAC components for handling SQLite. When I (in my Delphi program) try to write to the database like this: fdqFlashCard.Append; fdqFlashCard.FieldByName('GRAESK').AsString:= 'græsk'; fdqFlashCard.FieldByName('DANSK').AsString:= 'dansk'; fdqFlashCard.FieldByName('LEKTION').AsString:= 'lektion'; fdqFlashCard.Post; Then I get this error: [FireDAC][Phys][SQLite]ERROR: Attempt to write a readonly database I have been searching without a result. Anybody with a helping hint? BR Lars ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Error trying to do inner joins
Thank you, This SQL works fine. Is the inner join normally used for connecting 3 tables where the "middle one" is a link table? /Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af David Raymond Sendt: 17. august 2017 21:16 Til: SQLite mailing list Emne: Re: [sqlite] Error trying to do inner joins There's an issue with the join statement in the first join you're joining Saetning and Verb_Saetn, but the ON clause uses fields in Verb_Saetn and Verbum, not Saetning. And then you join that back to Saetning, so you've joined Saetning twice and Verbum 0 times. Since the Saetning table shows up twice in your join that's why the fields are ambiguous. Try... ...FROM Saetning INNER JOIN Verb_Saetn ON Saetning.SAETNING_ID = Verb_Saetn.SAETNING_ID INNER JOIN Verbum ON Verb_Saetn.VERBUM_ID = Verbum.VERBUM_ID -Original Message- From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] On Behalf Of Lars Frederiksen Sent: Thursday, August 17, 2017 2:54 PM To: sqlite-users@mailinglists.sqlite.org Subject: [sqlite] Error trying to do inner joins Hello, I have a small db with 3 tables: CREATE TABLE IF NOT EXISTS "Verb_Saetn"( VS_ID INT PRIMARY KEY NOT NULL, VERBUM_ID INT NOT NULL, SAETNING_ID INT NOT NULL, FOREIGN KEY(VERBUM_ID) REFERENCES Verbum(VERBUM_ID), FOREIGN KEY(SAETNING_ID) REFERENCES Saetning(SAETNING_ID) ); CREATE TABLE IF NOT EXISTS "Verbum"( VERBUM_ID INT PRIMARY KEY NOT NULL, NUTID VARCHAR(40) NULL, DATID_IMPF VARCHAR(40) NULL, DATID_PERF VARCHAR(40) NULL, FREMTID_IMPF VARCHAR(40) NULL, FREMTID_PERF VARCHAR(40) NULL, GULINTNOT NULL, TYPE VARCHAR(20) NOT NULL, NOTE TEXTNULL ); CREATE TABLE IF NOT EXISTS "Saetning"( SAETNING_ID INT PRIMARY KEY NOT NULL, SENTENCE_EN VARCHAR(200) NOT NULL, SENTENCE_EL VARCHAR(200) NOT NULL ); The Verb_Saetn table is a link table between Verbum and Saetning (sentence in danish). I try this SQL text: SELECT SENTENCE_EN, SENTENCE_EL FROM Saetning INNER JOIN Verb_Saetn ON Verb_Saetn.Verbum_ID = Verbum.Verbum_ID INNER JOIN Saetning ON Saetning.Saetning_ID = Verb_Saetn.Saetning_ID; But get this error: ambiguous column name: SENTENCE_EN - reason of this error? - is inner joins the correct way to "connect" two tebles via a "link-table"? Best Regards Lars ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Error trying to do inner joins
Hello, I have a small db with 3 tables: CREATE TABLE IF NOT EXISTS "Verb_Saetn"( VS_ID INT PRIMARY KEY NOT NULL, VERBUM_ID INT NOT NULL, SAETNING_ID INT NOT NULL, FOREIGN KEY(VERBUM_ID) REFERENCES Verbum(VERBUM_ID), FOREIGN KEY(SAETNING_ID) REFERENCES Saetning(SAETNING_ID) ); CREATE TABLE IF NOT EXISTS "Verbum"( VERBUM_ID INT PRIMARY KEY NOT NULL, NUTID VARCHAR(40) NULL, DATID_IMPF VARCHAR(40) NULL, DATID_PERF VARCHAR(40) NULL, FREMTID_IMPF VARCHAR(40) NULL, FREMTID_PERF VARCHAR(40) NULL, GULINTNOT NULL, TYPE VARCHAR(20) NOT NULL, NOTE TEXTNULL ); CREATE TABLE IF NOT EXISTS "Saetning"( SAETNING_ID INT PRIMARY KEY NOT NULL, SENTENCE_EN VARCHAR(200) NOT NULL, SENTENCE_EL VARCHAR(200) NOT NULL ); The Verb_Saetn table is a link table between Verbum and Saetning (sentence in danish). I try this SQL text: SELECT SENTENCE_EN, SENTENCE_EL FROM Saetning INNER JOIN Verb_Saetn ON Verb_Saetn.Verbum_ID = Verbum.Verbum_ID INNER JOIN Saetning ON Saetning.Saetning_ID = Verb_Saetn.Saetning_ID; But get this error: ambiguous column name: SENTENCE_EN - reason of this error? - is inner joins the correct way to "connect" two tebles via a "link-table"? Best Regards Lars ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] Tutorials, books, video about SQLite
Thank you for all your advices concerning books about SQLite. I will have a closer look! Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Nico Williams Sendt: 9. august 2017 22:19 Til: SQLite mailing list Emne: Re: [sqlite] Tutorials, books, video about SQLite By far the best generic SQL book, IMO, is the O'Reilly "SQL" Pocket Guide. It's very small and yet fairly comprehensive. It covers Oracle, DB2, SQL Server, and MySQL. But it's very general and brief, and everything it has to teach you is generally applicable to PostgreSQL and SQLite3. Nico -- ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Mailinglist question
Hi Is it possible to read the mails directly on a server instead of receiving the mails constantly? Regards Lars ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] Tutorials, books, video about SQLite
Hi I would appreciate very much if you clever people out there have some booktitles or links to tutorials (websites, video etc) about SQLite. Regards Lars ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] [FirDAC][Phys][SQLite]ERROR: Cipher: DB is not encrypted
Hi, I have added my SQLite database to DataExplorer in Delphi 10.1. I get this Errormessage [FirDAC][Phys][SQLite]ERROR: Cipher: DB is not encrypted When double click on some of the nodes or if I try to refresh the node of my database. My Encrypt property in the FDConnection Editor is set to "No" but changing this to one of the encryption possibilities does not (and should not) change anything. Any solution? Regards Lars ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] TEXT shows as (WIDEMEMO) in DBGrid
Hi Gunter and Clemens! Thank you for your help. I appears that the Connection Editor in FDConnection has a StringFormat property and after setting this to Unicode the problem was solved. Regards Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Hick Gunter Sendt: 7. august 2017 10:47 Til: 'SQLite mailing list' Emne: Re: [sqlite] TEXT shows as (WIDEMEMO) in DBGrid It would be so much easier if you could provide hex dumps of the strings involved. Maybe just a few characters and a verbal description of what you think you are storing (greek lowercase alpha, ...). From appearances it seems that your text objects are locale aware, which would suggest a code-page based approach instead of UTF8. Hint: If what you put in is all special characters and half as long as what is returned, then you are converting ISO to UTF8 somewhere along the way. -Ursprüngliche Nachricht- Von: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] Im Auftrag von Lars Frederiksen Gesendet: Montag, 07. August 2017 10:39 An: 'SQLite mailing list' <sqlite-users@mailinglists.sqlite.org> Betreff: Re: [sqlite] TEXT shows as (WIDEMEMO) in DBGrid Hi, My code is simple. FDConnection, FDQuery, DataSource + DBGrid, 3 Edits and a button. Then this OnClick event: Procedure TForm1.Button1Click(Sender: TObject); begin FDTable1.Open; FDTable1.Append; FDTable1.FieldByName('gms_id').AsInteger:= StrToInt(edNummer.Text); FDTable1.FieldByName('gms_graesk').AsString:= edGræsk.Text; // this is greek letters but in DBGrid it is something like '?e? e??ae ?a???' FDTable1.FieldByName('gms_dansk').AsString:= edDansk.Text; FDTable1.Post; end; Regards Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Clemens Ladisch Sendt: 7. august 2017 10:28 Til: sqlite-users@mailinglists.sqlite.org Emne: Re: [sqlite] TEXT shows as (WIDEMEMO) in DBGrid Lars Frederiksen wrote: > I have followed 2 tutorials about SQLite, and none of these mentioned the > VARCHAR() possibility Because SQLite pretty much ignores column types. Interpreting "VARCHAR" this way is how FireDAC does things; you have to look into the FireDAC documentation. > But I also realized that it is not possible just to put some greek (unicode) > characters into a field. It ends up with a mix of latin chars and > questionmarks. > Is there a (simple) solution on this problem? Yes: fix the bugs in your code (which you have not shown). Regards, Clemens ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ Gunter Hick Software Engineer Scientific Games International GmbH FN 157284 a, HG Wien Klitschgasse 2-4, A-1130 Vienna, Austria Tel: +43 1 80100 0 E-Mail: h...@scigames.at This communication (including any attachments) is intended for the use of the intended recipient(s) only and may contain information that is confidential, privileged or legally protected. Any unauthorized use or dissemination of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the sender by return e-mail message and delete all copies of the original communication. Thank you for your cooperation. ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] TEXT shows as (WIDEMEMO) in DBGrid
Hi, My code is simple. FDConnection, FDQuery, DataSource + DBGrid, 3 Edits and a button. Then this OnClick event: Procedure TForm1.Button1Click(Sender: TObject); begin FDTable1.Open; FDTable1.Append; FDTable1.FieldByName('gms_id').AsInteger:= StrToInt(edNummer.Text); FDTable1.FieldByName('gms_graesk').AsString:= edGræsk.Text; // this is greek letters but in DBGrid it is something like '?e? e??ae ?a???' FDTable1.FieldByName('gms_dansk').AsString:= edDansk.Text; FDTable1.Post; end; Regards Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Clemens Ladisch Sendt: 7. august 2017 10:28 Til: sqlite-users@mailinglists.sqlite.org Emne: Re: [sqlite] TEXT shows as (WIDEMEMO) in DBGrid Lars Frederiksen wrote: > I have followed 2 tutorials about SQLite, and none of these mentioned the > VARCHAR() possibility Because SQLite pretty much ignores column types. Interpreting "VARCHAR" this way is how FireDAC does things; you have to look into the FireDAC documentation. > But I also realized that it is not possible just to put some greek (unicode) > characters into a field. It ends up with a mix of latin chars and > questionmarks. > Is there a (simple) solution on this problem? Yes: fix the bugs in your code (which you have not shown). Regards, Clemens ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] TEXT shows as (WIDEMEMO) in DBGrid
Thank you Clemens! I am trying to learn FireDAC and SQLite, indeed a steep learning curve! I just realized that it is possible to replace TEXT with VARCHAR(). I have followed 2 tutorials about SQLite, and none of these mentioned the VARCHAR() possibility But I also realized that it is not possible just to put some greek (unicode) characters into a field. It ends up with a mix of latin chars and questionmarks. Is there a (simple) solution on this problem? Regards Lars -Oprindelig meddelelse- Fra: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org] På vegne af Clemens Ladisch Sendt: 7. august 2017 08:33 Til: sqlite-users@mailinglists.sqlite.org Emne: Re: [sqlite] TEXT shows as (WIDEMEMO) in DBGrid Lars Frederiksen wrote: > CREATE TABLE gms( > gms_id INTEGER PRIMARY KEY, > gms_verb TEXT NOT NULL > ); > > FDTable1.Append; > FDTable1.FieldByName('gms_verb').AsString:= Edit1.Text; FDTable1.Post; > > But when I put a string in the table 'gms_verb' I only get the primary > key number - the string is shown like (WIDEMEMO). In SQLite, all text values are Unicode and can have an arbitrary size, so dtWideMemo is what FireDAC thinks is the best match. You could use a different type name, or set up a type mapping: http://docwiki.embarcadero.com/RADStudio/XE7/en/Using_SQLite_with_FireDAC#SQLite_Data_Types Regards, Clemens ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[sqlite] TEXT shows as (WIDEMEMO) in DBGrid
Hi, I am using Delphi 10.1 and I am trying to learn how to handle FireDAC with SQLite as a database. Beeing used to ADO and Access I find the learning curve a bit steep! My simple project: I have build a simple SQLite database with only 2 fields: a primary key integer and a text field, like this: CREATE TABLE gms( gms_id INTEGER PRIMARY KEY, gms_verb TEXT NOT NULL ); I have placed FDConnection, FDTable and DataSource + DBGrid and DBNavigator. An Edit and a button with this OnClick code: procedure TForm1.Button1Click(Sender: TObject); begin FDTable1.Append; FDTable1.FieldByName('gms_verb').AsString:= Edit1.Text; FDTable1.Post; end; But when I put a string in the table 'gms_verb' I only get the primary key number - the string is shown like (WIDEMEMO). Any explanation of this? Best Regards Lars ___ sqlite-users mailing list sqlite-users@mailinglists.sqlite.org http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users