Page 1 of 1

Unable to Connect via MySQL under D9 using Rev_64

Posted: 04.10.2006, 04:46
by mcolgin
Lib Version: ZEOS-TESTING-REV_64
Compiler: Delphi 2005 Update 3
Target: VCL for Win32
DB Server: MySQL 4.1.20-standard on Linux

I've been forced to move from a known evil (Delphi 7) to a lesser-known evil (Delphi 2005) and I've had to download/install the latest ZEOS_TESTING_REV_64 from a link provided on the forums (as the production version did not compile in D9).

I've followed all the procedures of compiling the units in order and installing the packages. All directories have been added to the IDE Search/Browse paths and I've installed all the libmysql*.dll files in %SYSTEM32% (and tried using known good libmysql41.dll libraries that other mysql-client program use).

But I'm having troubles getting the TZConnection to establish a connection to the database. I know that the Host/DB/User/Password are correct and valid for the testing computer and I've tried setting the protocol to different versions of MySQL.

Database := MYDBNAME
HostName := IP|HOSTNAME
User := MYDBUSER
Password := MYDBPASSWORD
Protocol := 'mysql-4.1' (have tried all of them)

Setting the ZConnection1.Connected := TRUE at design-time or run-time always yeilds:

Code: Select all

Access Violation at address 00000000. Read of address 00000000.
Clicking the "Details" button the error-dialog shows:

Code: Select all

[40005F5B]{rtl90.bpl   } System.@HandleAnyException (Line 9625, "system.pas" + 13) + $0
[7C903786]{ntdll.dll   } RtlConvertUlongToLargeInteger + $41
[7C90EAF5]{ntdll.dll   } KiUserExceptionDispatcher + $9
[18A562DB]{ZDbc90.bpl  } Zdbcmysql.TZMySQLConnection.Open + $6F
[18A561D5]{ZDbc90.bpl  } Zdbcmysql.TZMySQLConnection + $C5
[18A55D62]{ZDbc90.bpl  } Zdbcmysql.TZMySQLDriver.Connect + $9E
[18A12E2D]{ZDbc90.bpl  } Zdbcintfs. + $0
[16B58307]{ZComponent90.bpl} Zconnection.TZConnection.Connect + $1AB
[16B57D4D]{ZComponent90.bpl} Zconnection.TZConnection.SetConnected + $2D
[4002751E]{rtl90.bpl   } TypInfo.SetOrdProp (Line 1322, "TypInfo.pas" + 31) + $0
[0033BA66]{designide90.bpl} DesignEditors.TEnumProperty.SetValue (Line 1332, "DesignEditors.pas" + 5) + $6
[0033A1F4]{designide90.bpl} DesignEditors.TPropertyEditor.Edit (Line 626, "DesignEditors.pas" + 11) + $16
[007B650A]{coreide90.bpl} PropInsp.TPropertyInspector.PropListEditDblClick (Line 837, "PropInsp.pas" + 20) + $5
[00A3CF2D]{vclide90.bpl} IDEInspListBox.TInspListBox.DoEditDblClick (Line 980, "ideinsplistbox.pas" + 2) + $A
[0053CF02]{vcl90.bpl   } Controls.TWinControl.WndProc (Line 6673, "Controls.pas" + 51) + $4
[4003EEC0]{rtl90.bpl   } Classes.StdWndProc (Line 11456, "classes.pas" + 8) + $0
[77D48731]{user32.dll  } GetDC + $6A
[77D48811]{user32.dll  } GetDC + $14A
[77D489C8]{user32.dll  } GetWindowLongW + $122
[77D48A0B]{user32.dll  } DispatchMessageW + $A

I'm really at a loss at this point and would appreciate any help. This problem will occur on a very simple form, in a new-blank project and only the TZConnection component.

Posted: 04.10.2006, 05:26
by bangfauzan
Have you copy all mysql library e.g. libmysql.dll into your system folder?
also, have you add path of build zeos component e.g. C:\ZeosLib\packages\delphi9\build into your delphi search path?