Page 1 of 1

wince

Posted: 22.10.2007, 11:02
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?

Posted: 22.10.2007, 23:11
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 ;)

wince

Posted: 24.10.2007, 07:33
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.

Posted: 24.10.2007, 08:06
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

Posted: 13.11.2007, 00:38
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.

Two more to the WinCE Club

Posted: 15.06.2008, 23:36
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:

Posted: 06.08.2008, 01:57
by sandeep_c24
Hi Cigydd

Have you had any luck with Zeos on WinCE?

Regards

Sandeep

Still no success

Posted: 06.08.2008, 07:15
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.

Posted: 06.08.2008, 07:38
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.

Posted: 06.08.2008, 07:48
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.

Posted: 06.08.2008, 07:48
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

Posted: 06.08.2008, 10:28
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

Posted: 06.08.2008, 15:30
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.

Posted: 16.08.2008, 17:59
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.

wince AND QT

Posted: 31.08.2008, 23:50
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?