Yep.. I tried a simpler query and it worked as well as working fine in MySQL Control Center as it is written here. The problem arose when I moved the DB from 4.1?? to 3.23.37, and that is when this showed up. I was wondering it is has to do with the way MySQL 3.23 is formating the date field, and was hoping there was some sort of "ToString" functions that could be used in the SQL statement it's self??

Again many thanks,

Tom T

Ed Lazor wrote:

Have you tried a more simple query to make sure that communication between
your application and the database is working properly?

Have you tried a variable name for 'Tick Date' that does not include spaces?

-Ed




-----Original Message-----
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









Reply via email to