Page 1 of 1

ErangeError in ZEOSDBO-6.6.6-stable

Posted: 20.10.2010, 08:33
by Alex17000
Hi all,

I made a old program with my Delphi 5, this program connected on MySql 4.0.15. with ZEOSDBO-6.6.1-beta.

All was ok, but now I must to recompile it with the last ZEOSDBO-6.6.6-stable, I don't change the Mysql version and the mysql Dll, but when I launch my program I have an exception ERangeError on ZDbcCache.pas :

Code: Select all

procedure TZRowAccessor.SetPChar(ColumnIndex: Integer; Value: PChar);
begin
{$IFNDEF DISABLE_CHECKING}
  CheckColumnConvertion(ColumnIndex, stString);
{$ENDIF}
  case FColumnTypes[ColumnIndex - 1] of
    stString:
      begin
        if Value <> nil then
        begin
     
  (*HERE->*)   FBuffer.Columns[FColumnOffsets[ColumnIndex - 1]] := 0;
          StrLCopy(@FBuffer.Columns[FColumnOffsets[ColumnIndex - 1] + 1], Value,
            FColumnLengths[ColumnIndex - 1] - 1);


        end else
          FBuffer.Columns[FColumnOffsets[ColumnIndex - 1]] := 1;
      end;
    else
      SetString(ColumnIndex, Value);
  end;
end;
ZEOSDBO-6.6.6-stable is it compatible with Mysql 4.0.15 ?

The exception appear on the ZReadOnlyQuery_show.open;
A datasource is connected on this ZReadOnlyQuery_but I delete the datasource without any amelioration.

Thanks a lot,

Posted: 08.11.2010, 00:23
by mdaems
What protocol did you define on your connection? mysql ord mysql40?
Attention in zeoslib 6.6.6 you have to use a setting is zeos.inc :

Code: Select all


// Enables Mysql 3.x and 4.0 support
// These versions are deprecated and will not be supported in future versions of zeoslib.
{.$DEFINE ENABLE_MYSQL_DEPRECATED}
Here you'll have to remove the dot to enable those deprecated protocols.

Mark

Posted: 08.11.2010, 09:38
by Alex17000
Hi,
What protocol did you define on your connection? mysql ord mysql40?
I define mysql.
Here you'll have to remove the dot to enable those deprecated protocols.
I make it, but I have the same result.

The new Zeos have it tested on old version of mysql?


Thanks,

Posted: 10.11.2010, 21:36
by mdaems
If you define mysql without version number zeoslib 6.6 takes the mysql 5 driver as a default.
So please make sure:
- You explicitly select the mysql 4.0 protocol on your connection component
- The libmysql.dll file for mysql 4.0 is available in the system path

I hope this works. I had it working in the past, but I don't have a mysql 4 server running anymore. The driver codebase didn't change for a long time in version 6.6, so I suppose it still works.

Mark

Posted: 16.11.2010, 12:11
by Alex17000
Hi,

>- You explicitly select the mysql 4.0 protocol on your connection component
>- The libmysql.dll file for mysql 4.0 is available in the system path

Yes, I have done that..no solve of my problem.

It's strange that anyone don't rapport this problem too.

Thanks,

Posted: 17.11.2010, 21:32
by mdaems
Hi,

It's not so strange. The mysql version you're referring to dates from 3 september 2003. This is an extremely old mysql version, even in the mysql 4.0 series. Last download I have with me is 4.0.27 from 6 may 2006.

I'm not sure of this answer as you did already try a lot but here is my take on your problem:
- Usually range errors like these tend to originate from incompatible or defect libmysql versions.
- If you don't want to upgrade your mysql server, you could at least try to use the most recent mysql client for mysql 4. If you want I can send you the 4.0.27 version. At least try that one. I have tested zeoslib with it in the past. Maybe you're lucky too.
- Did you try the libmysql40 dll from the zeoslib libs directory in the svn repository? I don't know which version that is, however. It's still available in the 'STABLE' snapshot on http://zeosdownloads.firmos.at/downloads/snapshots/

Mark

Posted: 22.11.2010, 11:49
by Alex17000
Hi,

Thanks for your time, I go to test by updating a mysql server to the lastest stable version.

Bye,