Welcome to the dBforums forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions, articles and access our other FREE features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload your own photos and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact support.

If you prefer not to see double-underlined words and corresponding ads, place your cursor
here for ContentLink opt out.

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, 02: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, 19 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

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