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

Reply via email to