Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2004-03

Creating database with SQLiteDataset

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Milos Pejovic

Hi all,

I was trying to adapt TDbf table creation demo to SQLiteDataset, but I get this error:

An unhandled exception occurred at 0x080557E4 :
EDatabaseError : : Dataset is read-only.
0x080557E4
0x00000050

I have no idea how to put the DataSet in read/write mode...

fpc 1.9.2 linux
sqlite library 2.8.13

Cheers,
Milos

Michael Van Canneyt
to Milos Pejovic
Milos Pejovic wrote 11 lines
Hi all, I was trying to adapt TDbf table creation demo to SQLiteDataset, but I get this error: An unhandled exception occurred at 0x080557E4 : EDatabaseError : : Dataset is read-only. 0x080557E4 0x00000050 I have no idea how to put the DataSet in read/write mode...

The SQLIte dataset is read-only, it cannot be put in read/write mode.

Michael.

Milos Pejovic
to Michael Van Canneyt
Michael Van Canneyt wrote 22 lines
On Mon, 22 Mar 2004, Milos Pejovic wrote: >Hi all, > >I was trying to adapt TDbf table creation demo to SQLiteDataset, but I >get this error: > >An unhandled exception occurred at 0x080557E4 : >EDatabaseError : : Dataset is read-only. > 0x080557E4 > 0x00000050 > >I have no idea how to put the DataSet in read/write mode... > > The SQLIte dataset is read-only, it cannot be put in read/write mode. Michael.

Ok, perhaps it would be possible to port SQLite4Delphi to Free Pascal - http://sqlite4delphi.sourceforge.net/
But it seems quite fpc unfriendly at the moment :/

Cheers,
Milos

Unknown author
to Milos Pejovic
Milos Pejovic wrote 28 lines
Michael Van Canneyt wrote: >On Mon, 22 Mar 2004, Milos Pejovic wrote: > > > >>Hi all, >> >>I was trying to adapt TDbf table creation demo to SQLiteDataset, but I >>get this error: >> >>An unhandled exception occurred at 0x080557E4 : >>EDatabaseError : : Dataset is read-only. >> 0x080557E4 >> 0x00000050 >> >>I have no idea how to put the DataSet in read/write mode... >> >> > >The SQLIte dataset is read-only, it cannot be put in read/write mode. > >Michael. > Ok, perhaps it would be possible to port SQLite4Delphi to Free Pascal - http://sqlite4delphi.sourceforge.net/ But it seems quite fpc unfriendly at the moment :/

Not really. I got it to compile. I'll send you a mail in private with the modified sources. You'll have to re-implement 1 method, though.

TSLDataset.AddFieldDef is currently mostly ifdef-ed. If you rework the code so it works with FPC, you should be able to test it. If your tests are succesfull, then we can send the modifications to the maintainers.

Having looked at the sources, I'll have to
1. Add a bug to the FPC bug repository.
Assigned(<Array of type>) does not work in FPC.
2. Implement some additional methods in TDataset, which currently don't exist.

Keep me posted of any progress you make, please.

Michael.