wince

Freature requests from users for ZeosLib's DBOs

Moderators: gto, cipto_kh, EgonHugeist, mdaems

Post Reply
gibbe
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 23.09.2007, 17:14

wince

Post by gibbe »

Your ZeosLib DBO Version: 6.6.1 beta
The IDE you are using: Lazarus
Version (and maybe patchlevel) of the IDE: 0.9.23 beta
The database you are using: MySQL
Version of the database: 5
Used protocol:
[hr]Error description and post

I use zeos 6.6.1 for access to mysql 5 databases with lazarus 0.9.23 from a linux computer. All works OK. I will soon need to write a small client application for a PDA to access databases on the same server. Is there a Zeos port for windows ce?
gto
Zeos Dev Team
Zeos Dev Team
Posts: 278
Joined: 11.11.2005, 18:35
Location: Porto Alegre / Brasil

Post by gto »

I think Zeos is only a library in Object Pascal/Delphi language.

What you really need is a port of a compiler (like FPC) to WinCE ;)
Use the FU!!!!!IN Google !

gto's Zeos Quick Start Guide

Te Amo Taís!
gibbe
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 23.09.2007, 17:14

wince

Post by gibbe »

Well, lazarus is just an open source IDE (a clone of delphi) on top of FPC 2.2.0. It can produce arm-wince applications from windows XP, I've tried it with success. But as soon as a zeos connexion is added on the form, it doesn't compile and shows errors. Part of zeos source code use asm instructions which seem not compatible with arm processor.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

If I didn't overlook something the only asm instruction is in ZCollections.pas

Code: Select all

{**
  Raises a collection error.
  @param Msg an error message.
  @param Data a integer value to describe an error.
}
class procedure TZCollection.Error(const Msg: string; Data: Integer);

  function ReturnAddr: Pointer;
  asm
          MOV     EAX,[EBP+4]
  end;

begin
  raise EListError.CreateFmt(Msg, [Data]) at ReturnAddr;
end;

Does somebody know a way to avoid this using plain object pascal (FPC)? Preferably compatible with Delphi, but just indicate if not.
Can you also state (dis)advantages of the alternative?

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

Post by kakarotv5 »

I need to make applications for WinCE under Lazarus too.
gibbe wrote: But as soon as a zeos connexion is added on the form, it doesn't compile and shows errors. Part of zeos source code use asm instructions which seem not compatible with arm processor.
I have the same problem than you.

Is there a Zeos port for WinCE?

Regards.
Cigydd
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 15.06.2008, 22:54
Location: Plzen, Czechia, Europe
Contact:

Two more to the WinCE Club

Post by Cigydd »

Hello folks,

our company is very interested in using Zeos on PocketPCs.
If it was possible and I was successfull, I would post a patch to the Zeos code to bring it to work on WinCE.
Still no success but there are some steps already made.

1) Concerning the assembler instruction.

I don't know if it's well written but as I read the documentation to the ARM processor assembly language and another post about "porting" to 64-bit Intel-like processors, the only one assembler instruction, as mentioned above, should change to conditional code – something like this:

Code: Select all

    {$IFDEF WIN64}
      MOVQ 32(%RBP),%RAX
    {$ELSE}
      {$IFDEF WINCE}
        LDR R0, [R13, #4]
        //LDR R0, [R11, #4]
      {$ELSE}
        MOV EAX, [EBP+4]
      {$ENDIF}
    {$ENDIF}
As you see, I'm pretty unsure about what ARM register is the right equivalent to Intel 32-bit i386's EBP. Maybe I'm wrong in other aspects. But this code at least compiles.

2) Concerning errors raised during debugging on the start of the debuggee or program silently vanishing from memory directly after its start while running without debugger.

I thought this could be related to the assembler instruction mentioned above. Could it? Could not? Who knows? Me not yet. Further research needed. I'll try to track down the unit, procedure and maybe line that causes the crash just by starting (loading Zeos' units into memory).

But there is one evidence already there. Just adding the ZConnection unit to a uses clause wherever in your project causes your program to crash in the already mentioned manner, just after its start.

Every help with our effort would be gladly appreciated! :wink:
sandeep_c24
Expert Boarder
Expert Boarder
Posts: 158
Joined: 06.11.2005, 01:43

Post by sandeep_c24 »

Hi Cigydd

Have you had any luck with Zeos on WinCE?

Regards

Sandeep
Cigydd
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 15.06.2008, 22:54
Location: Plzen, Czechia, Europe
Contact:

Still no success

Post by Cigydd »

We changed our attention to the Lazarus' ODBC component.
Alas, it fails to load data from a Sybase ASA9 query on WinCE.
By now, we still don't have a working database access.
Maybe we shall return to Zeos or write our own lightweight driver.
Still it seems to be the easiest way to correct or rework the ODBC connection component.
sandeep_c24
Expert Boarder
Expert Boarder
Posts: 158
Joined: 06.11.2005, 01:43

Post by sandeep_c24 »

Well since my post I have tried the TSqliteDataset component in Lazarus and it works fine. I think I'll use that for my current app.
Cigydd
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 15.06.2008, 22:54
Location: Plzen, Czechia, Europe
Contact:

Post by Cigydd »

A bit off-topic but hopefully still in its place:
Is the SQLite server placed on your mobile device or out of it - on a PC?
I don't know much about SQLite; we'd like to access a database storage offline that would be installed directly on the device and then copy the data to a PC DB server.
User avatar
mdaems
Zeos Project Manager
Zeos Project Manager
Posts: 2766
Joined: 20.09.2005, 15:28
Location: Brussels, Belgium
Contact:

Post by mdaems »

Did you have a lookhere ?

We did replace the ASM call so fpc should handle it platform specific. (Putting the work on to the FPC team :P )

If you need a package instead of SVN : the stable 6.6.3 release file is available in the snapshots directory. It's a draft that will probably will be just renamed (90% chance).

Please report if this was a good fix.

Mark
Image
sandeep_c24
Expert Boarder
Expert Boarder
Posts: 158
Joined: 06.11.2005, 01:43

Post by sandeep_c24 »

Hi Mark

I'll try and use Zeos tomorrow and see if I can get it to work on WinCE.

Cigydd - I have Sqlite database on the device. It's very easy to use sqlite, just copy sqlite dll to the device where your exe is and then use sqlite database file by setting up some properties in TSlite dataset component.

Sandeep
Cigydd
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 15.06.2008, 22:54
Location: Plzen, Czechia, Europe
Contact:

Post by Cigydd »

OK, Sandeep, I still have a question about SQLite, I'll write you a private message (pm).

It looks like Zeos is going to work on WinCE. I'll look at the recent snapshot and try it, maybe today.
Cigydd
Fresh Boarder
Fresh Boarder
Posts: 11
Joined: 15.06.2008, 22:54
Location: Plzen, Czechia, Europe
Contact:

Post by Cigydd »

I wrote "today" but still didn't have the time. Now I'm on my holiday so maybe as I return to work. My apologies.
kc87654321
Fresh Boarder
Fresh Boarder
Posts: 2
Joined: 31.08.2008, 23:39

wince AND QT

Post by kc87654321 »

HI
Zeoslib its great lib ,THANK for work.
real like it,but I need to make applications for WinCE and QT under Lazarus too. how?
Post Reply