Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > DB-Aware

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 08-06-2018, 06:48 PM
larshgf larshgf is offline
Senior Member
 
Join Date: Jan 2001
Posts: 237
Default FireDAC SQLite ERROR

Hej Liste,

I have 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
);


I use Delphi 10.2 and the FireDAC components.
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
Reply With Quote
  #2  
Old 08-14-2018, 03:49 PM
rojam rojam is offline
Senior Member
 
Join Date: Jun 2015
Posts: 191
Default

Quote:
Originally Posted by larshgf View Post
Hej Liste,

I have 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
);


I use Delphi 10.2 and the FireDAC components.
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
What directory does your database sit on? Do you have WRITE access to that directory?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:58 PM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2018, vBulletin Solutions, Inc.