MinGW and Mysql(sample program)

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MinGW and Mysql(sample program)

jayshankar nair
Hi,

I am trying to run a simple MySQL database connect program. The program dumps on mysql_real_connect.

I tried to to fix mysql.h file as per wiki pages. But still it dumps.

int my_connect1(){
MYSQL *objlMySQL;
my_bool mbool_reconnect = 1;

mysql_library_init(0, 0, 0);
 objlMySQL = mysql_init(NULL);
    if(!mysql_real_connect(objlMySQL, "localhost", "oot","oot123", "yan", 0, NULL, CLIENT_MULTI_STATEMENTS | CLIENT_MULTI_RESULTS))
        {
       printf("connection problem ");

        }

}
OS: Windows XP
Database: MySQL Server 5.1.

I was wondering whether its a libmysql.dll issue or something do with the mysql api calls.

Please let me know.

Thanks,
Jay


     

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) Thread hijacking
3) HTML/MIME encoded mail
4) Improper quoting
5) Improper trimming
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: MinGW and Mysql(sample program)

Roger Pack
> OS: Windows XP
> Database: MySQL Server 5.1.
>
> I was wondering whether its a libmysql.dll issue or something do with the mysql api calls.

Try 5.0 -- for us ruby fellas that's the only one that seems to work
for us on windows.
-r

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
MinGW-users mailing list
[hidden email]

A: Yes.
> Q: Is it really?
>> A: Because the logical conversation flow is disrupted.
>>> Q: Why does MinGW object to top posting?
(abstracted from Larry Hall signature)

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.

Most annoying abuses are:
1) Top posting
2) Thread hijacking
3) HTML/MIME encoded mail
4) Improper quoting
5) Improper trimming
_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users