Problemy z MySQL

0

Witam, mam taki problem, podany poniżej kod wyrzuca mi błąd
"Project SQL.exe raised exeption class EDatabaseError with message 'dbExpress Error: [0x0003]: Invalid Field Type'

Nie wiem gdzie jest błąd

unit Main;
interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, DBXpress, ComCtrls, StdCtrls, DB, SqlExpr, FMTBcd;
type
  TForm1 = class(TForm)
    SQLConnection1: TSQLConnection;
    Button1: TButton;
    StatusBar1: TStatusBar;
    ComboBox1: TComboBox;
    Button2: TButton;
    procedure Button2Click(Sender: TObject);
    procedure SQLConnection1AfterDisconnect(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
    procedure SQLConnection1AfterConnect(Sender: TObject);
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.Button1Click(Sender: TObject);
  begin
    SQLConnection1.Connected := (not SQLConnection1.Connected);
  end;

procedure TForm1.SQLConnection1AfterConnect(Sender: TObject);
  var
    x:TStringList;
  begin
    StatusBar1.SimpleText := 'Połączony';
    Button1.Caption := 'Rozłącz';
  end;

procedure TForm1.FormDestroy(Sender: TObject);
  begin
    if SQLConnection1.Connected then SQLConnection1.Connected := false;
  end;

procedure TForm1.SQLConnection1AfterDisconnect(Sender: TObject);
  begin
    StatusBar1.SimpleText := 'Rozłączony';
    Button1.Caption := 'Połącz';
  end;

procedure TForm1.Button2Click(Sender: TObject);
  begin
    SQLConnection1.GetTableNames(ComboBox1.Items, '', false); {właśnie tutaj jest coś nie tak, nie wiem jak pobrać listę tabel}
  end;

end.
0

http://4programmers.net/Forum/viewtopic.php?id=89963

a głównie zła wersja libmysql.dll

0

ja piszę w c++ bulderze ale myślę że komponęty są takie same.
funkcja GetTableNames ma 2 a nie 3 parametry.

"SQLConnection1->GetTableNames(ListBox1->Items,false);"

0

Mogą być dwa albo trzy parametry

SQLConnection1.GetTableNames(List:TStringList; SchemaName:String; SystemTables:boolean)

To którą wersję biblioteki polecacie. Ja zainstalowałem sobie najnowaszy serwer MySQL

0

odp masz w linku, który Ci podałem

1 użytkowników online, w tym zalogowanych: 0, gości: 1