[AccessD] bit OT VB6 Application Problem With Moving to SQL Server 2019

Gustav Brock gustav at cactus.dk
Wed Dec 24 03:41:08 CST 2025


Hi Paul

OK, it might be a VB6 special but I don't have VB6 running. Or could it be the ODBC driver?
Perhaps this is the time to move to .Net?

/gustav


________________________________
Fra: Paul Hartland <paul.hartland at googlemail.com>
Sendt: Tirsdag 23 December 2025 17:26
Til: Gustav Brock <gustav at cactus.dk>
Emne: Re: [AccessD] bit OT VB6 Application Problem With Moving to SQL Server 2019

Hi Gustav,

That was my first thought, but the field looks like still set to datetime as it has been for years now.

It's almost like when I assign the field the datetime in VB6 the sql field is adding the additional milliseconds on, so not sure how to control that bit as the actusl table field is datetime.


Paul Hartland
paul.hartland at googlemail.com<mailto:paul.hartland at googlemail.com>

On Tue, 23 Dec 2025, 16:15 Gustav Brock, <gustav at cactus.dk<mailto:gustav at cactus.dk>> wrote:
Hi Paul

It sounds like you are using Datetime2 as the datatype. VB6 and VBA are not happy with that.
Try a change to Datetime.

/gustav

________________________________
Fra: AccessD <accessd-bounces+gustav=cactus.dk at databaseadvisors.com<mailto:cactus.dk at databaseadvisors.com>> på vegne af Paul Hartland via AccessD <accessd at databaseadvisors.com<mailto:accessd at databaseadvisors.com>>
Sendt: Tirsdag 23 December 2025 16:39
Til: Access List <accessd at databaseadvisors.com<mailto:accessd at databaseadvisors.com>>
Cc: Paul Hartland <paul.hartland at googlemail.com<mailto:paul.hartland at googlemail.com>>
Emne: [AccessD] bit OT VB6 Application Problem With Moving to SQL Server 2019

To all,

We have a VB6 application that has been running on SQL server 2012/2014 for
a few years now, we have recently started to move to SQL server 2019 have
have encountered a date error.  The general error being is something like
Datatype Mismatch

If I profile the SQL Server date being updated looks like the one below
with nine digits for the milliseconds.
[image: image.png]

If I profile it on SQL Server 2012/2014 I get no error and datetime is the
same as above but without the .215696444 and all is fine, any ideas what
this could be.


--
Paul Hartland
paul.hartland at googlemail.com<mailto:paul.hartland at googlemail.com>



More information about the AccessD mailing list