If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Have you use emmbedded mysql in C++Builder?i met a problem,i hope you can help me

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-09-03, 01:38
feelfly feelfly is offline
Registered User
 
Join Date: Dec 2003
Posts: 18
Have you use emmbedded mysql in C++Builder?i met a problem,i hope you can help me

Hi!


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.
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;
}
when i run the program the error picture is in attach file

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 answer
Attached Images
File Type: bmp error.bmp (597.1 KB, 30 views)
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On