MySql 4.1 and v1.80.9.0

MySql 4.1 and v1.80.9.0

Postby Morkai » Mon 08 Nov 2004 22:08

We are using the 1.80.9.0 version of MySqlDirect and I am attempting to upgrade to MySql 4.1

I am getting the following error when trying to access the new db.

An unhandled exception of type 'CoreLab.MySql.MySqlException' occurred in corelab.mysql.dll

Additional information: Client does not support authentication protocol requested by server; consider upgrading MySQL client

1.80 was Mysql 4.1 compliant when we purchased it, is this no longer the case?

Regards

Victoria
Morkai
 

Re: MySql 4.1 and v1.80.9.0

Postby Oleg » Tue 09 Nov 2004 12:01

You should update libmysql.dll where MySQLDirect. NET is used.
Please check that libmysql.dll version 4.1 is present in \WINNT\SYSTEM32 folder.
Oleg
Devart Team
 
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Postby Guest » Tue 09 Nov 2004 15:58

Aha - I always wondered where that dll came in.

Thankyou.

Only problem now is that an ExecuteScalar command that works perfectly with the old database is now giving me an exception.

Dim strSql As String = "SELECT trialby FROM tblTrialBy"
Dim sqlCmd As MySqlCommand = New MySqlCommand(strSql, MySqlConn)

sqlCmd.ExecuteScalar()

Exception thrown:
System.FormatException: Input string was not in a correct format.

I'm confused, its just simple select statement.

Thanks

Victoria
Guest
 

Postby Oleg » Thu 11 Nov 2004 15:40

We tested this problem with MySQL 4.1.5,

DEPT table:

CREATE TABLE DEPT (
DEPTNO INT PRIMARY KEY,
DNAME VARCHAR(14),
LOC VARCHAR(13)
);


and the next sample:
Code: Select all
MySqlConnection mySqlConnection1 = new MySqlConnection();
MySqlCommand mySqlCommand1 = new MySqlCommand();
mySqlConnection1.ConnectionString = "User
Id=root;Password=test;Database=test;Port=3307;";
mySqlCommand1.CommandText = "select deptno from dept";
mySqlCommand1.Connection = mySqlConnection1;
mySqlConnection1.Open();
Console.WriteLine(mySqlCommand1.ExecuteScalar());


It works correctly. Try to find out in what your example differs from our one.
Oleg
Devart Team
 
Posts: 264
Joined: Thu 28 Oct 2004 13:56

Postby Morkai » Mon 15 Nov 2004 17:29

I found the problem. I am returning a string not a numerical value. If I return a number it works fine.

I have checked the ExecuteScalar method and I can see nowhere that says it is specifically for numerical values.

Try your example there again and this time return the DNAME.
Morkai
 

Postby Oleg » Wed 17 Nov 2004 15:27

Yes, the problem you specified is really present.
MySQLDirect .NET 1.80 supports MySQL 4.1.0 but doesn't support 4.1.1 as these versions have a lot differences in protocol and API.
This support was added to MySQLDirect .NET 2.0, see History:
- MySQL 4.1.1 alpha support added
Oleg
Devart Team
 
Posts: 264
Joined: Thu 28 Oct 2004 13:56


Return to dotConnect for MySQL