[AccessD] Access 365 and Azure - DateTime fields

Stuart McLachlan stuart at lexacorp.com.pg
Tue Jun 23 02:34:24 CDT 2020


Correction!  Datetime2 is 100 nanosecond precision, not icrosecond!

On 23 Jun 2020 at 17:30, Stuart McLachlan wrote:

> Try changing the  field to datetime2.
> 
> https://docs.microsoft.com/en-us/sql/t-sql/data-types/datetime-transac
> t-sql?view=sql-server-v er15 <quote> DateTime.... Use the time, date,
> datetime2 and datetimeoffset data types for new work. These types
> align with the SQL Standard. They are more portable. time, datetime2
> and datetimeoffset provide more seconds precision. </quote>
> 
> Sounds like the driver is trying to write a DateTime2 (microsecoonds)
> compatible value to a parameter bound to a  DateTime (milliseconds)
> field.
> 
> 
> On 23 Jun 2020 at 16:13, David Emerson wrote:
> 
> > Hi Listers,
> > 
> > 
> > 
> > Another problem with the conversion from SQL 2008 to Azure L
> > 
> > 
> > 
> > When saving a record with a date field in it I am getting an error
> > "[Microsoft][ODBC Driver 17 for SQL Server]Datetime field overflow.
> > Fractional second precision exceeds the scale specified in the
> > parameter binding."
> > 
> > 
> > 
> > What confuses me is that the record already has the date fields
> > filled in and saved.  All I am changing is a text field.
> > 
> > 
> > 
> > I am using ADO to get the recordset for the form.  The SQL table
> > date fields are datetime SQL data type to match the Access date data
> > type.
> > 
> > 
> > 
> > This article came the closest to having useful information but I am
> > not sure how to set the number of decimal digits.
> > 
> > 
> > 
> > http://rightondevelopment.blogspot.com/2009/10/sql-server-native-cli
> > en t-100- datetime.html
> > 
> > 
> > 
> > Can anyone steer me in the right direction?
> > 
> > 
> > 
> > Regards
> > 
> > David Emerson
> > Dalyn Software Ltd
> > Wellington, New Zealand
> > 
> > 
> > 
> > 
> > 
> > -- 
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> > 
> 
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
> 




More information about the AccessD mailing list