List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:December 18 2003 2:17pm
Subject:Re: Comparing date fields (Delphi programmers take note)
View as plain text  
Hi,

Interesting.


> Thanks for all those who helped me with this a few days ago (I've only now
> had the chance to get back to programming).
>
> As someone correctly surmised, I am using Delphi and connecting to mySQL
via
> a TQuery (actually a TZQuery, via Zeos components). What I have discovered
> is that
> 1. mySQL doesn't like queries with date parameters (one must pass the date
> as a literal)

Hmmm... I do make use of parameters, but I noticed MySQL doesn't
provide me with the right datatype (like Firebird or InterBase do). So
I'm passing everything as a string to the parameter. :-/

> 2. the date format has to be changed to that of mySQL.

Well, that makes sense of course :-)

> 3. if one uses a table alias ("p" in my case), one is not allowed to use
the
> full table name - "projects.closeddate" causes an error, but p.closeddate
is
> ok.

That's according to the SQL standard: if you use an alias, address the
table by it's alias only.


With regards,

Martijn Tonies
Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL
Server.
Upscene Productions
http://www.upscene.com

Thread
RE: Comparing date fields (Delphi programmers take note)Noamn18 Dec
  • Re: Comparing date fields (Delphi programmers take note)Martijn Tonies18 Dec
  • Countries, cities, states databaseAugusto Cesar Castoldi18 Dec
    • Re: Countries, cities, states databaseBernard Clement18 Dec