Page 1 of 1

MySql 4.1 and v1.80.9.0

Posted: Mon 08 Nov 2004 22:08
by Morkai
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

Re: MySql 4.1 and v1.80.9.0

Posted: Tue 09 Nov 2004 12:01
by Oleg
You should update libmysql.dll where MySQLDirect. NET is used.
Please check that libmysql.dll version 4.1 is present in \WINNT\SYSTEM32 folder.

Posted: Tue 09 Nov 2004 15:58
by Guest
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

Posted: Thu 11 Nov 2004 15:40
by Oleg
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.

Posted: Mon 15 Nov 2004 17:29
by Morkai
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.

Posted: Wed 17 Nov 2004 15:27
by Oleg
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