Re: Aggregates on DateTime fields

From: Dave Blake (barnswood_at_hotmail.com)
Date: 08/09/04


Date: Mon, 9 Aug 2004 06:59:29 +0100


>
> You don't say what database you are using?
> I don't have any problem with a query like this that uses MS SQL server
>

Actually I did - Access, i.e. Jet 4.0 OLEDB data provider.

The query works in Access itself, and works if I have a data aware control
linked to the dataset. However if I just open such a query in code to get
the result from the dataset (no linked controls) then the associated Tfield
is non-null, of type dtDatetime but unuseable - asdatetime, asstring or
assigning a TDatetime variable to the value all cause "Invalid floating
point operation" errors. Link a data aware control and it all goes away.

So what is the datalink doing to translate the value? On google someone says
that you can't use aggregates in datetime fields, but there is nothing in
the MS documentation for Jet and it works for data aware controls. All very
odd.

Dave



Relevant Pages

  • Microsoft Office Spreadsheet 11.0 -- DataSource
    ... I've got an Access ADP connecting to SQL Server 2000. ... wanted to run a simple Ad Hoc query, so I built a form with a multiline ... that functionality into the Microsoft Datagrid 6 control I'm using, ... Dim rst As ADODB.Recordset ...
    (microsoft.public.access.formscoding)
  • RE: Help Needed
    ... Yes this is an Access form, and this form is being used to gather criteria to ... be used in the SQL Query. ... By removing the 'Control Source' property, I can no longer change the ... it sounds like this is kind of a query by form setup. ...
    (microsoft.public.access.queries)
  • Problems in Access (error 2185) creating custom form to build dynamic query.
    ... The form should build a query that can be stored or used to view the ... pure VB6 form connected to an Access 2000 MDB database. ... When I click the command button to display the query with just one parameter ... control has the focus". ...
    (microsoft.public.access.formscoding)
  • Re: How can I show data in a form
    ... >> create a new query with all the fields in that you want ... >> 'Control Source' property. ... >>> Query - Customer Query ... >>> Cost per Hour ...
    (microsoft.public.access.forms)
  • Re: Help Please -- Importing from excel to access
    ... The SQL statement from your query shows that ControlNum is a field in ... If PONumber stands for "purchase order", ... Orders to Customer - not directly related ... At one point it seems to be, when you say "each control number relates to ...
    (microsoft.public.access.externaldata)