Link to home
Start Free TrialLog in
Avatar of star90
star90

asked on

VC++ How to connect MYSQL net connector without CLR support

Hi,
I am using VC++
I am trying to use the Versant object database which for some reason I have linking errors when using the CLR support.
I also have access in the same program to MYSQL using net connector with CLR support.
So I was thinking to give up the CLR support and try to use the Versant Object database and MYSQL without the CLR support:
but it seems that in order to add the reference: MySQL.Data.dll  to the project
 I need the CLR support, otherwise if the project is not a CLR project there is no option of "browse" to add the file MySQL.Data.dll

Does anyone have a solution for this?
Is it possible to use the net connector without CLR support?
Which other options do I have?

Thanks!
-----------------------------------------------------------------------------
the connector location:
C:\Program Files (x86)\MySQL\MySQL Connector Net 6.2.4\Assemblies
the commands I am using are:
using namespace System;
using namespace System::Data;
 
using namespace MySql::Data::MySqlClient;
using namespace std;
//
MySqlConnection ^conn = gcnew MySqlConnection("Server=localhost;Database=test;Uid=root;Pwd=abc;Port=3306;");

conn->Open();

MySqlCommand ^cmd = gcnew MySqlCommand();
cmd->Connection = conn;
cmd->CommandType = System::Data::CommandType::Text;
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

You could use ODBC but people say it is slower.  http://www.mysql.com/products/connector/
Avatar of star90
star90

ASKER

Hi DaveBaldwin,
Thank you for the answer,
Assuming I use the ODBC, Is there an easy way to convert from the net connector syntax to the ODBC syntax?
Thanks
I don't know, I've just used ODBC with ASP and ASP.NET web pages.  I see there is also a C++ connector on that web page.  Is that the one that you are using?
Avatar of star90

ASKER

I am using currently the net connector which I find it easy to use.
Il am not sure if to use the ODBC or the C++ or the C connector.
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial