2

I'm trying to use embedded mysql database using libmysqld.dll (mysql 5.1) with zeos (7.0.3) in Delphi XE
i put libmysqld.dll in the same directory,
folder language\errmsg.sys
folder data\belajar\biodata.frm,biodata.MYD,biodata.MYI,db.opt

unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, ZAbstractConnection, ZConnection;

type
  TForm1 = class(TForm)
    Button1: TButton;
    ZCon: TZConnection;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
begin
       ZCon.Protocol := 'mysqld-5';
       zcon.Database := 'belajar';
       zcon.Connect;
end;

end.

When i run the code, click the button1 and then it just closed, no error message, the application terminated.

any help?


update:

i have solved this problem, i put the wrong name and version of "language" folder, it should be "share" folder and errmsg.sys in the english subfolder

thankyou everyone

Erwan
  • 202
  • 3
  • 10
  • 1
    1) Trace incide into `zcon.Connect` to see exact error point. / 2) Sysinternals Process Monitor can help you to see last program action before crash, that sometimes solves "wrong path" issues / 3) use more traditional for embedding database, like SQLite, Firebird, NexusDB, etc – Arioch 'The May 08 '13 at 16:04
  • 1
    Try to set all of the connection's properties via the object inspector, and set the connected property to true. See what error message you get. Also, make sure that you don't mix a 32bits application with a 64bits libmysqld. – Wouter van Nifterick May 08 '13 at 17:32

0 Answers0