Lazarus + WinCE + SQLite remote database

Forum related to SQLite

Moderators: gto, cipto_kh, EgonHugeist

Post Reply
kakarotv5
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 12.11.2007, 22:30

Lazarus + WinCE + SQLite remote database

Post by kakarotv5 »

I want to build with Lazarus a program for WinCE that works with a SQLite remote database.

I have created a web server, I have used Apache 2.2.6

The address of my web server is this.

In the web server I have put a SQLite database.

I want to connect to the SQLite database with a program made under Lazarus for WinCE but I do not know how do it.

I already know how to connect to the database if it is in the hard disk, but I do not know how to connect to the database if it is in the web server.

How I can do it?

What I need?

Can anybody help me?

Thanks.

Regards.
Last edited by kakarotv5 on 02.12.2007, 03:53, edited 3 times in total.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Hi,

As SQLite does not support remote connections, you will have to use some program on the apache server that serves the data from the database to your lazarus program. As far as I understand in Delphi this is done by using a ClientDataset on the remote site and a DatasetProvider at the server side. I'm not sure similar componets are available in Lazarus. (I'm afraid not)

Mark
kakarotv5
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 12.11.2007, 22:30

Post by kakarotv5 »

Thanks to respond to me.
mdaems wrote:As SQLite does not support remote connections
If I use ZEOSLib ¿I do not connect to a remote database?

I thought that if I used ZEOSLib then I could connect to a remote database.

Thanks.

Best regards.
martinrame
Junior Boarder
Junior Boarder
Posts: 25
Joined: 24.10.2006, 18:29
Location: Córdoba, Argentina
Contact:

Post by martinrame »

Yes, Zeos allows you to connect to remote database servers. But SQLite is not a server, just a local databse engine.

If you try to connect to a remote MySql or Postgresql, you can do with ZEOS.

Leonardo
kakarotv5
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 12.11.2007, 22:30

Post by kakarotv5 »

Then why to use ZEOS and SQLite?

What we can do with ZEOS and SQLite?

Thanks.

Regards.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Generally: You could use Zeoslib to access SQLite as any other supported database engine. The only difference are the connection parameters. Other components are used the same way whatever server you use. (Of course, DB specific syntax in queries isn't portable) The only limitation is inherent to SQLite : only databases on the filesystem of your program are supported.

In your case :
You could use zeoslib to write a data broker for your remote application. As said before : when you had been using Delphi you could have used the DatasetProvider component. Please have a look around. Probably there are FPC equivalents available. And, if they are not available : consider a database change over writing your own broker. Firebird and Mysql are good alternatives for SQLite in combination with Zeoslib.
An other solution would be to write a web based application (if that's possible using Lazarus). In that case all logic runs on your server, where you can use zeos+SQLite.

Mark
kakarotv5
Fresh Boarder
Fresh Boarder
Posts: 6
Joined: 12.11.2007, 22:30

Post by kakarotv5 »

Thank you very much.
Post Reply