Hello,
I'm trying to use ZeosDBO6.6.0 with Turbo Delphi Prof (BDS 2006).
If I try to set "ZQuery1.active:= true" I get an ERangeError (in German: "Fehler bei Bereichsüberprüfung").
What can I do?
ERangeError by Query
Moderators: gto, cipto_kh, EgonHugeist
It fails for all SELECT-Queries (query.open).mdaems wrote:No idea, but your information is quite 'limited'.
Can you provide some detail information?
Does it fail for one specific query or for all queries? If only for a specific case, can you provide an easy reproduction setup (table creation script and failing query)?
Mark
I can insert data into the database but cannot read by "SELECT".
This is the code I wrote:
Code: Select all
ZQuery1.SQL.Text:= 'SELECT * FROM artikeldaten_stamm';
Zquery1.Open;
If I use "ExecSQL" instead of "Open" I don't get an error. But I also don't get any data.
And with
Code: Select all
ZQuery1.SQL.Text:= 'INSERT INTO artikeldaten_stamm SET ' +
'bezeichnung = ''turbo delphi'', ' +
'barcode = 12981928';
ZQuery1.ExecSQL;
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Strange, it must be a range check error while fetching the results. Maybe you use an incompatible dll for the protocol you selected (so we could point to the wrong places in buffers). Can you find the exact statement where the range check error occurs?
BTW, selects do work for most users, even for BDS2006...
Mark
BTW, selects do work for most users, even for BDS2006...
Mark
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Hi Hamza,
Did you not add the point where the failure was? I was thinking you wrote it failed on a call in the plain driver units.
This typically happens when the layout of the mysql buffers changed between versions. Did you use the DLL we provide and was your app actually loading this version? You can be a little more sure when you name the dll libmysql50.dll and put it in the same dir as your app. Early mysql 5 versions certainly have this problem. Also, when a mysql 4 dll is in your path, you may have this kind of trouble.
Mark
Did you not add the point where the failure was? I was thinking you wrote it failed on a call in the plain driver units.
This typically happens when the layout of the mysql buffers changed between versions. Did you use the DLL we provide and was your app actually loading this version? You can be a little more sure when you name the dll libmysql50.dll and put it in the same dir as your app. Early mysql 5 versions certainly have this problem. Also, when a mysql 4 dll is in your path, you may have this kind of trouble.
Mark
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
I agree this kind of problem is an horror. Problem her was that he actually found a dll (windows behaviour : if it finds a dll with the right name somewhere he's happy). So it used a dll in your path.
There is a way you can detect bad dll versions for mysql, however.
You can use the Serverversion properties of your connection. If you use the 6.6.1 release it should be included and working before you connect. Just check if serverversion > 5000000 (5.0.0) and you should be allright. (to be correct: there was also a different buffer layout in earlier dll versions for version 5, so you better use a number like 5000020.
A second solution is enabling the {$DEFINE MYSQL_STRICT_DLL_LOADING} directive in zeos.inc. That way only the dll with versioned name is tried.
Mark
There is a way you can detect bad dll versions for mysql, however.
You can use the Serverversion properties of your connection. If you use the 6.6.1 release it should be included and working before you connect. Just check if serverversion > 5000000 (5.0.0) and you should be allright. (to be correct: there was also a different buffer layout in earlier dll versions for version 5, so you better use a number like 5000020.
A second solution is enabling the {$DEFINE MYSQL_STRICT_DLL_LOADING} directive in zeos.inc. That way only the dll with versioned name is tried.
Mark