Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

MySQL connector/driver behaviour with Visual C++ CLR/CLI project

13 views
Skip to first unread message

0

unread,
Feb 2, 2010, 11:48:42 PM2/2/10
to
Hello. i'm having an issue getting the MySQL connector/driver to
behave proberly with a Visual C++ CLR/CLI project.... my issue is
best described by this screen capture: http://img97.imageshack.us/i/mysqlissue.jpg/

The host name that MySQL is trying to resolve is a series of strange
characters.... certainly not the "string" that is passed into the
connector function. The exception handler is saying: Unknown MySQL
server host 'U‹ìWVS ì ' (11004)... clearly it is not trying to
connect to tcp://bluetech

Has anyone see this? Could it have to do with language/character sets
or something? I've already tried: this->con = this->driver->connect
(L"tcp://bluetech:3306",L"SC",L"SC"); but, the connect function is
looking for a std::string.

Can someone please help me?

Thanks!

Dann Corbit

unread,
Feb 3, 2010, 12:22:57 AM2/3/10
to
In article <7e24d166-16db-4953-b819-0e26231bf068
@u41g2000yqe.googlegroups.com>, jeffrey....@gmail.com says...

>
> Hello. i'm having an issue getting the MySQL connector/driver to
> behave proberly with a Visual C++ CLR/CLI project.... my issue is
> best described by this screen capture: http://img97.imageshack.us/i/mysqlissue.jpg/
>
> The host name that MySQL is trying to resolve is a series of strange
> characters.... certainly not the "string" that is passed into the
> connector function. The exception handler is saying: Unknown MySQL
> server host 'U?ᅵWVSᅵᅵ ' (11004)... clearly it is not trying to

> connect to tcp://bluetech
>
> Has anyone see this? Could it have to do with language/character sets
> or something? I've already tried: this->con = this->driver->connect
> (L"tcp://bluetech:3306",L"SC",L"SC"); but, the connect function is
> looking for a std::string.

Guess: I wonder if you have the project type defined correctly.

Under the "Solution Properties"/General tab, check to see if character
set is what you want (you might try mbcs if it is unicode and that is
not what is wanted, for instance).

I guess that you will have better fortune asking VC++ specific questions
of this nature in one of the Microsoft programming groups.

HTH

Michael Foukarakis

unread,
Feb 3, 2010, 3:24:01 AM2/3/10
to

You are hiding the driver's implementation, so there's not much to
say. I'll assume you're using the non-deprecated mysql_real_connect()
function to connect to a MySQL database; in that case, there's a lot
of mandatory parameters you might be missing in your call. Again,
based on the stripped-down interface you're showing, it's hard to
tell.

If you care to provide some more related info, we might be able to
help.

Cheers.

red floyd

unread,
Feb 3, 2010, 11:10:22 AM2/3/10
to

Your best bet is to go to a group with microsoft and/or VC in it's
name.
C++/CLI is not -- despite what MS wishes -- C++. It's off-topic here,
as
are O/S specific issues.

0

unread,
Feb 7, 2010, 11:01:16 PM2/7/10
to

just a follow up here. i used the .NET version of the MySQL
connector. that seemed to do the trick! the .NET connector uses the
System::String as the inbound parameters. this eliminates all the
language/character issues.

cheers

0 new messages