I am trying to get access to the MySQL embedded server using the library "libmysql.dll" through c++builder. The loading of the library goes well, but when calls are made to start the server, the application crashes.when i run the program ,the program crashed in mysql_server_end
my program as follows #include <vcl.h>
#include <basetsd.h>
#include <winsock.h>
#include <mysql.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#pragma hdrstop USERES("Project2.res"); USEFORM("Unit1.cpp", Form1); USELIB("D:\program file\CBuilder5\Bin\libmysqd.lib"); //---------------------------------------------------------------------------
WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int) { try { Application->Initialize(); // Application->CreateForm(__classid(TForm1), &Form1); Application->Run(); int result; result = mysql_server_init(0, NULL, NULL); mysql_server_end(); } catch (Exception &exception) { Application->ShowException(&exception); }
return 0; }
my.ini as follows: #This File was made using the WinMySQLAdmin 1.4 Tool #2003-12-5 14:42:02
#Uncomment or Add only the keys that you know how works. #Read the MySQL Manual for instructions
[mysqld]
basedir=c:/mysql
#bind-address=10.34.44.120
datadir=c:/mysql/data
#language=c:/mysql/share/your language directory
#slow query log#=
#tmpdir#=
#port=3306
#set-variable=key_buffer=16M
[WinMySQLadmin]
Server=c:/mysql/bin/mysqld-nt.exe
user=root
password=root
[embedded] basedir=e:/mysql
datadir=e:/mysql/data
i don't know what's wrong ?can you help me? i look foward to your ans
_________________________________________________________________
免费下载 MSN Explorer: http://explorer.msn.com/lccn
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]