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

Discussion in 'C++' started by 0, Feb 3, 2010.

  1. 0

    0 Guest

    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!
     
    0, Feb 3, 2010
    #1
    1. Advertising

  2. 0

    Dann Corbit Guest

    In article <7e24d166-16db-4953-b819-0e26231bf068
    @u41g2000yqe.googlegroups.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
     
    Dann Corbit, Feb 3, 2010
    #2
    1. Advertising

  3. On Feb 3, 6:48 am, 0 <> wrote:
    > 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!


    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.
     
    Michael Foukarakis, Feb 3, 2010
    #3
  4. 0

    red floyd Guest

    On Feb 2, 8:48 pm, 0 <> wrote:
    > 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?
    >


    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.
     
    red floyd, Feb 3, 2010
    #4
  5. 0

    0 Guest

    On Feb 2, 10:48 pm, 0 <> wrote:
    > 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!


    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, Feb 8, 2010
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian S. Nelson

    PostgreSQL connector and Zope connector

    Ian S. Nelson, Jul 26, 2004, in forum: Python
    Replies:
    2
    Views:
    454
    Lee Harr
    Jul 27, 2004
  2. SenthilVel
    Replies:
    0
    Views:
    424
    SenthilVel
    Sep 7, 2006
  3. Leif902
    Replies:
    3
    Views:
    574
    Leif902
    Jul 11, 2007
  4. carmelo
    Replies:
    8
    Views:
    1,442
    Roland de Ruiter
    Oct 12, 2008
  5. 0
    Replies:
    5
    Views:
    2,075
    laurenelizabeth
    Sep 3, 2010
Loading...

Share This Page