Recent

Author Topic: Dataset became read only!  (Read 2433 times)

panoss

  • Full Member
  • ***
  • Posts: 156
  • You only live twice
Dataset became read only!
« on: October 10, 2014, 08:47:01 pm »
I 've made a simple database application in Lazarus for Linux.
I could write (save records) in it normally.
Then I opened the same project with Lazarus for windows (works through wine) and could not write! It became read-only!
I tried with the linx version of Lazarus and could not edit or save the records! Read-only!
 :o
What can I do?
Windows 7 32bit, Lazarus v1.8.4    FPC 3.0.4.

howardpc

  • Hero Member
  • *****
  • Posts: 3608
Re: Dataset became read only!
« Reply #1 on: October 10, 2014, 09:34:28 pm »
Remove the database file(s) read-only attribute(s) - assuming that is the source of read-only-ness?

panoss

  • Full Member
  • ***
  • Posts: 156
  • You only live twice
Re: Dataset became read only!
« Reply #2 on: October 10, 2014, 09:55:56 pm »
The file has read and write permission checked.
Windows 7 32bit, Lazarus v1.8.4    FPC 3.0.4.

panoss

  • Full Member
  • ***
  • Posts: 156
  • You only live twice
Re: Dataset became read only!
« Reply #3 on: October 10, 2014, 11:55:30 pm »
I added the code:
Code: [Select]
  SQLQuery2.Close;
  if not SQLite3Connection2.Connected then
  begin
    SQLite3Connection2.DatabaseName:= 'mydatabase.db';
    SQLQuery2.ReadOnly:=false;
  end; 
and works fine!
I have no idea why before opening the project with the Windows version of Lazarus it worked fine without this code... :o
Windows 7 32bit, Lazarus v1.8.4    FPC 3.0.4.

 

TinyPortal © 2005-2018