mysql_init() initialization problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

when i try to call the mysql_init function it is not getting initilized properly.
can someone help me


Re: mysql_real_connect() problem (Chinmay Shah) wrote in message
Quoted text here. Click to load it
i am attempting to connect mysql server to win32 application... as far
as initialization is concerned, it is successful but its showing some
problem when i use mysql_real_connect..... have used different
combinations to try and connect but all are unsuccessful... here is
the code which i have written.... is there any mistake in the code...
do let me know??????

the code is:


void ConnectToMySql()
    MYSQL mysql;

    char *mysql_host = "localhost";
    char *mysql_user = "root";
    char *mysql_pass = "";
    char *mysql_db   = "test";
    int mysql_port  = 3306;
    int mysql_flag  = 0;
    char *mysql_unix = NULL;

    //Allocates or initializes a MYSQL object
        MessageBox(g_hWnd,"Initialization Successful","Testing",0);
        MessageBox(g_hWnd,"Initialization Not Successful","Testing",0);
//attempts to establish a connection to a MySQL database engine
running on host
        MessageBox(g_hWnd,"Connection  1 Not Successful","Test",0);

        MessageBox(g_hWnd,"Connection 2 Not Successful","Test",0);

        MessageBox(g_hWnd,"Connection 3 Not Successful","Test",0);

        MessageBox(g_hWnd,"Connection 4 Not Successful","Test",0);

        MessageBox(g_hWnd,"Connection 5 Not Successful","Test",0);

        MessageBox(g_hWnd,"Connection 6 Not Successful","Test",0);
        MessageBox(g_hWnd,"Connection 7 Not Successful","Test",0);
Quoted text here. Click to load it

do let me at the earliest...

Quoted text here. Click to load it

Site Timeline