I have some problems with the win32 interface dll libMySQL.dll.
Everything works out fine when only retrieving correct queries.
However, when executing an incorrect query, everything behaves normal until i
terminate the application (and thus unload the dll).
With other types of access (mysql console (linux, nt, gui) or PHP i notice no problems
at all.
System: -libmySQL.dll for mysql 3.23 (date: 17-1-2001);
RedHat7, with the rpm of mysql 3.23 installed;
Windows 2000 pro SP1 workstation;
Programming environment: delphi 5.
My interface routines are based on the interface unit by Bob Silva, and like this:
TYPE
{some more type declarations....}
PMYSQL=^MYSQL;
MYSQL= record
_net: NET;
host,user,passwd,unix_socket,server_version,host_info,info,db: pchar;
port,client_flag,server_capabilities,protocol_version,field_count: Cardinal;
thread_id, affected_rows, insert_id, extra_info:longint;
status: mysql_status;
fields: PMYSQL_FIELD;
field_alloc: MEM_ROOT;
free_me, reconnect: MY_BOOL;
end;
function mysql_connect( _mysql: pmysql; const
host,user,passwd:pchar):pmysql;stdcall;external 'libmysql.dll';
procedure mysql_close( _mysql: pmysql); stdcall;external thelib;
function Mysqlconnect(host, user, pass:String): Boolean;
var f:PMySQL;
begin
f:=mysql_connect (@my_sql_db,PChar(host),PChar(user),PChar(pass));
Result:= (@my_sql_db=f);
end;
procedure Mysqldisconnect;
begin
mysql_close(@my_sql_db);
end;
Any ideas?