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  


> 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
> 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
> full table name - "projects.closeddate" causes an error, but p.closeddate
> 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
Upscene Productions

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