Technical Query regarding ODBC

Technical Query regarding ODBC

am 22.07.2008 14:49:12 von Pavithra

------=_NextPart_000_0012_01C8EC27.73FC3F90
Content-Type: text/plain;
charset="us-ascii"
Content-Transfer-Encoding: 7bit

Hello,



I am using VS 2005 with MySQL as Back End. I tried using ODBC connection ,
but showing me an error in VS Connection String as " MySQL ODBC 3.51 Driver
not found" even though ODBC connection is set up correctly(MySQL ODBC 3.51
Driver). I am unable to figure out where exactly the problem is of course
its in ODBC Driver. My connection string is like this, my code is working
fine in others system but not in mine. I am scratching my head since 3 days.



using MySql.Data.MySqlClient;



MySqlConnection con = new MySqlConnection("Driver={MySQL ODBC 3.51
Driver};Server=127.0.0.1;Database=tcz;Username=root;Password =test;Port=3306;
")



Kindly resolve this as soon as possible. I need it urgently.



Cheers

Pavithra






------=_NextPart_000_0012_01C8EC27.73FC3F90--

Re: Technical Query regarding ODBC

am 22.07.2008 15:09:07 von Imran Abizar

Pavithra,

Do you see the MySQL driver through ODBC Manager? Are you able to
connect using any other tool that uses ODBC?

I see that you do not have an ODBC DSN. I'd recommend you specify a DSN
and see if that changes any thing. Once you have a DSN, your connection
string will look like:

MySqlConnection conn = new
MySQLConnection("DSN=YourDSN;Username=root;Password=test")

Regards,
Imran.


Pavithra wrote:
> Hello,
>
>
>
> I am using VS 2005 with MySQL as Back End. I tried using ODBC connection ,
> but showing me an error in VS Connection String as " MySQL ODBC 3.51 Driver
> not found" even though ODBC connection is set up correctly(MySQL ODBC 3.51
> Driver). I am unable to figure out where exactly the problem is of course
> its in ODBC Driver. My connection string is like this, my code is working
> fine in others system but not in mine. I am scratching my head since 3 days.
>
>
>
> using MySql.Data.MySqlClient;
>
>
>
> MySqlConnection con = new MySqlConnection("Driver={MySQL ODBC 3.51
> Driver};Server=127.0.0.1;Database=tcz;Username=root;Password =test;Port=3306;
> ")
>
>
>
> Kindly resolve this as soon as possible. I need it urgently.
>
>
>
> Cheers
>
> Pavithra
>
>
>
>
>
>
>

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org

Re: Technical Query regarding ODBC

am 22.07.2008 18:48:18 von Jess Balint

Pavithra -

The code you have shown below is using MySQL Connector/Net. This is a
native ADO.NET provider and is completely unrelated to ODBC. You can
install Connector/Net and fix the connection string to continue using
the code you have now. Otherwise, you should use the ODBC provider
(including OdbcConnection) and it should work with the connection string
you're currently using.

Please see MySQL Connector/Net documentation at:
http://dev.mysql.com/doc/refman/5.0/en/connector-net.html

OdbcConnection documentation is available at:
http://msdn.microsoft.com/en-us/library/system.data.odbc.odb cconnection.aspx

Hope this helps,
Jess

On Tue, Jul 22, 2008 at 06:19:12PM +0530, Pavithra wrote:
> Hello,
>
>
>
> I am using VS 2005 with MySQL as Back End. I tried using ODBC connection ,
> but showing me an error in VS Connection String as " MySQL ODBC 3.51 Driver
> not found" even though ODBC connection is set up correctly(MySQL ODBC 3.51
> Driver). I am unable to figure out where exactly the problem is of course
> its in ODBC Driver. My connection string is like this, my code is working
> fine in others system but not in mine. I am scratching my head since 3 days.
>
>
>
> using MySql.Data.MySqlClient;
>
>
>
> MySqlConnection con = new MySqlConnection("Driver={MySQL ODBC 3.51
> Driver};Server=127.0.0.1;Database=tcz;Username=root;Password =test;Port=3306;
> ")
>
>
>
> Kindly resolve this as soon as possible. I need it urgently.
>
>
>
> Cheers
>
> Pavithra
>
>
>
>
>

--
MySQL ODBC Mailing List
For list archives: http://lists.mysql.com/myodbc
To unsubscribe: http://lists.mysql.com/myodbc?unsub=gcdmo-myodbc@m.gmane.org