Function YEAR

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for MySQL
Post Reply
dooh
Posts: 30
Joined: Sun 14 Jan 2007 21:11

Function YEAR

Post by dooh » Mon 05 Nov 2007 19:08

Hi,

I have the lastest verstion of corelab (3.5) and this query dont work:

SELECT YEAR(mydate) as y
FROM entries


MyDate is a datetime field.

Note: DAY, MONTH functions works.

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Tue 06 Nov 2007 13:41

I've tried the following query with MySQLDirect .NET 3.55

Code: Select all

select year(hiredate) from emp
and it does work.
Please make sure you are using the latest version of MySQLDirect .NET.

dooh
Posts: 30
Joined: Sun 14 Jan 2007 21:11

Post by dooh » Tue 06 Nov 2007 21:09

Alexy,

Is this the lastest version:
CoreLab.MySql, Version=3.55.25.0?

I am trying make a TableAdapter with and MySQL DataSet Wizard

The exact error is:
Error Source: CoreLab.MySql
Error Message: FUNCTION myDB.YEAR does not exist

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Wed 07 Nov 2007 09:55

Yes, the latest version is 3.55.25.
The error is MySQL server's error. Try to execute your SQL query in any other client.

dooh
Posts: 30
Joined: Sun 14 Jan 2007 21:11

Post by dooh » Wed 07 Nov 2007 19:39

I use Navicat the execute this query without any error:

select year(current_date)

return:
2007

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Thu 08 Nov 2007 09:00

Try to execute

Code: Select all

select year(hiredate) from emp
Make sure that connection string is the same for both MyDirect .NET and Navicat.
If the problem persists, please specify your hardware platform, operating system, version of MySQL server and send your test project to the address provided in the Readme.html file.

dooh
Posts: 30
Joined: Sun 14 Jan 2007 21:11

Post by dooh » Thu 08 Nov 2007 21:33

I Had

Visual Studio 2005
local: MySQL Server 5.0.26-community-nt
production: 5.0.27-community-nt

I am developing an Web Application

Why all these requisites?

Alexey
Posts: 2756
Joined: Mon 13 Mar 2006 07:43

Post by Alexey » Fri 09 Nov 2007 08:10

Please specify your hardware platform, operating system, and send me your project.
I'll need all this to reproduce the problem.

dooh
Posts: 30
Joined: Sun 14 Jan 2007 21:11

Post by dooh » Sat 10 Nov 2007 12:56

I found the problem.

The QueryDesigner of a Table Adapter, doest work with some functions of MySQLDirect


The subquery also does not work.

Post Reply