Strange Behaviors

From: skOOb (aaronwhitpan_at_gmail.com)
Date: 01/13/05


Date: 13 Jan 2005 06:39:01 -0800

I am having an issue right now of displaying the 'Age' of an item, but
only on 1 computer. I can take my app and install it on multiple
win98, winNT, and other winXP machines and have no problem. I install
it on one computer (my boss's btw) and it doesn't work. I'll try and
explain what I am trying to do.

I am using MySQL 4.0.17 with VB.NET 2003. I need to calculate the
difference of two dates, one of which is stored in the database, the
other is 'Now'. My process of getting info from the DB: I query the DB
with 10 columns of information, and usually returns about 10 rows.
Once I fill the DataSet I wrote a function to traverse the column that
stores the Date, and then calculate the difference and store it in the
column that stores the Age. Then populate my datagrid with the
dataset. It works like a charm on 99% of the computers I test it on
except the one that matters (talk about murphys law).

Some facts: The date field is stored as type 'datetime' in MySQL (which
looks like '0000-00-00 00:00:00'). And I convert it to look like
'00/00/0000' within the query using date_format to make VB.NET happy
about converting it. I've used about 3 different ways of calculating
the difference, including: DateDiff,
DateTime.Parse(Date1).Subtract(DateTime.Parse(Date2)).Days, and
Date1.Subtract(Date2).Days.ToString().

The Error: Either "Cast from type 'Byte()' to type 'Date' is not valid"
or "Cast from type 'Byte()' to type 'String' is not valid"
depending on which calculation I use.

I am looking for some ideas as to why this is happening. I do not see
why this is happening on just 1 computer. Any ideas?

Thanks in advance.

Oh Yeah, just to add to the madness...that 1 computer works fine when
it points to a MySQL 4.1 or 5.0 server. So all computers work fine
when pointed to 4.1 or above, and only 1 doesn't when pointing to
4.0.17.



Relevant Pages

  • DBI / DBD / MySQL installation problem
    ... I used to run Red Hat 9, and had a perfect relationship with Perl, DBI, ... able to connect to MySQL from Perl via DBI. ... Running install for module Mysql ...
    (perl.dbi.users)
  • Re: Vista Compatible Games List So Far
    ... Americas Army 2.7 ... Age of Empires II and the Conquerors expansion ... From the begining I had no problems with Quake3 but MOHAA weren't woriking. ... Maybe you should install some DX9 liberies. ...
    (microsoft.public.windows.vista.games)
  • Installing Puresecure on Solaris 8
    ... Getting puresecure installed on Solaris was very difficult. ... I had to manually install a number of things. ... CONFIGURING MYSQL: ... INSTALLING PERL MODULES ...
    (comp.security.misc)
  • Re: Enabling MySQL for PHP on CentOS 5
    ... I cannot get PHP to use mysql correctly. ... find are instructions to install each portion from scratch. ... If you have the mysql-dev and apache-dev packages installed, ...
    (comp.os.linux.misc)
  • Re: Problem installing Mysql from Zeniz.com on 5.0.7
    ... The FSU-threads needs the system to have all the latest patches. ... FSU-threads and MySQL are very tempramental to system changes and the way ... Please specify the operating system you want to install Pthreads on: ... SCO UNIX ...
    (comp.unix.sco.misc)