In your query you have converted the Date column into a string by using
DATE_FORMAT so it is a string of bytes. If you want it to still be a
date then don't format it.

John Bonnett

-----Original Message-----
From: Thomas Trutt [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 7 October 2004 2:29 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Date Type Probelm


Hello all.. I'm running into a little bit of a problem.. I'm writing a 
program in VB.NET and every time i try to load query results into my 
dataset i keep getting:

/An Unhandled Exception of type 'System.InvalidOperationException' 
occurred in system.data.dll

Additional information: Inconvertable type mismatch between SourceColumn

'Tick Date' of Byte[] and the Datacolumn 'Tick Date' of DateTime.

/The Query I'm using is:

/SELECT DATE_FORMAT(date,'% %M %e %Y') as 'Tick Date', SUM( IF " 
(Ticktype='1',1,0)) as 'Technical', SUM( IF (Ticktype='2',1,0)) as 
'Reference', SUM( IF (Ticktype='3',1,0)) as 'Directional', SUM( IF 
(Ticktype='4',1,0)) as 'Search' FROM tickcount GROUP BY 
DATE_FORMAT(date,'% %M %e %Y')

/ I have tried changing the datatype in the dataset definition but the 
only one that works is unasignedbyte, and that returns " Byte [] Array" 
instead of the date that I'm formating..
I'm using MySQL version 3.23.37, and VB.NET v.1.2

Any help would be great,

Many thanks,

Tom T

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to