Uwe Grauer wrote:
There was no reply for my question. So i will ask again.
If i run my Database Application stand alone, it works OK.
If running under lazarus, it is freezing (Program doesn't respond any more)
What could be the reason?
My first thought: Does your program also crash when you run it inside gdb? (in
particular the gdb executable configured in the Debugger options dialog)
I've also had problems running my project from Lazarus in the past. In
particular, I couldn't connect to a mysql database. But I wasn't sure it was
the databse connection because perhaps something went wrong with for example
the command line parameter processing. My 'solution' back then was to run in
from a command prompt.
I've just been testing a simple program that connects to mysql (see the source
below), and I find out that when running it from Lazarus I get the following
error from MySQL:
'Can't create TCP/IP socket (10106).'
When running it from the prompt everything works ok. When running it from the
mingw gdb exe distributed with Lazarus, it works ok too.
So the problem indeed still persists.
OS: Win XP SP2
FPC: 2.0.0
Laz: SVN from last Wednesday
MySQL dll: 3.23.58
Any ideas??
Regards,
Bram
=== Test program ===
program mysqltest;
{$mode objfpc}{$H+}
uses
mysql3;
var
m:PMYSQL;
dummy:string;
begin
m:=mysql_init(nil);
if mysql_connect(m,'localhost','equill','equill')=nil then
begin
writeln('Can''t connect because: ',mysql_error(m));
readln(dummy); // forces the console to wait so you can see the output in
Lazarus
Halt(1);
end;
mysql_select_db(m,'equill');
writeln('mysql_get_client_info: ',mysql_get_client_info);
writeln('mysql_get_host_info : ',mysql_get_host_info(m));
writeln('mysql_get_proto_info : ',mysql_get_proto_info(m));
writeln('mysql_get_server_info: ',mysql_get_server_info(m));
readln(dummy); // forces the console to wait so you can see the output in
Lazarus
mysql_close(m);
end.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives