SQLquery unopenable under AMD64?
Original Reporter info from Mantis: Rangar
-
Reporter name: David
Original Reporter info from Mantis: Rangar
- Reporter name: David
Description:
Hi, I have had people on the lazarus irc forum test this code,and it seems to work fine unless you're on a 64bit platform. sqlquery.open and sqlquery.active := true both cause a raised exception class 'Unknown'.
Exec pauses at
Address:$0000000000720565
Procedure:
File: pointer
and then again at
Address:$00000000004C9580
Procedure:fpc_raiseexception
File:
A test procedure showing how I am attempting to do this is as follows..
procedure TForm1.FormCreate(Sender: TObject);
begin
{
Try to make a connect to the MySQL database
}
if MySQL50Connection1.Connected then
MySQL50Connection1.Close;
MySQL50Connection1.Hostname := '127.0.0.1';
MySQL50Connection1.Username := 'root';
MySQL50Connection1.Password := 'test';
MySQL50Connection1.DatabaseName := 'mysql';
MySQL50Connection1.Connected := true;
MySQL50Connection1.Open;
if MySQL50Connection1.Connected then
begin
SQLTransaction1.Database := MySQL50Connection1;
SQLQuery1.DataBase := MySQL50Connection1;
SQLQuery1.Transaction := SQLTransaction1;
SQLQuery1.SQL.Text := 'show databases';
SqlQuery1.ParseSQL := false;
SQLQuery1.Open; { <------ CRASH POINT }
while not SQLQuery1.EOF do begin
memo.Append(SQLQuery1.Fields[0].AsString );
SQLQuery1.Next;
end;
SQLQuery1.Close;
end;
end;
Mantis conversion info:
- Mantis ID: 10202
- Fixed in version: 2.2.2
- Fixed in revision: r8639 (#0a0c7127)