PC Review


Reply
Thread Tools Rate Thread

BUG? DateTime in Dataset truncates time (hours, etc.) in Access2000

 
 
François Rioux
Guest
Posts: n/a
 
      26th Aug 2003
Hi,

As a temporary storage between 2 sessions of VB application, I persist a
dataset generated from an Access 2000 DB as an XML file. However when I
update, the hour part of the date fields get truncated. Only the date is
inserted back.

It can't be such a big flaw or I would certainly have found reference to
this issue in newsgroups. It's got to be a
configuration/localization/version issue. Here is the context and the
process followed.

I use VS.Net 2003, version 7.1.3088. All code is in VB.
Microsoft Jet 4.0 Oledb Provider. ODBCJT32.DLL version 4.00.6019.
ConnectionString defines only Provider and Datasource parameters
(Provider='Microsoft.Jet.OLEDB.4.0'; Data Source = 'xxx.mdb'.
Database is in Access 2000 format.
Regional Settings are French(Canada)
Application.CurrentCulture = New System.Globalization.CultureInfo("en-US").


I have a dataset with a table with a datetime column. The dataset table was
generated with the DACW from an Access Table.

The Access table is populated programatically. with SQL commands. (not
through the Dataset if that matters).

The data adapter fills the dataset table.

The dataset is persisted to a file with writexml.

Later, in another session, the dataset reads the xml file (readxml).

I try to update a copy of the access db with the content of the dataset
using the Update method of the data adapter to insert the new rows
(InsertCommand queries autogenerated by the wizard). (Both access db are
copies form the same template so they have the same schema).

The update work but only the date part of the datetime field is inserted.
Hours and Minutes are dropped. I haven't check if any update would cause
the error, the context doesn't require it for that table.

I'm puzzled. Any help would be greatly appreciated.

Francois Rioux


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access2000: Error when searching recordset for DateTime value Arvi Laanemets Microsoft Access 5 28th May 2007 06:49 AM
Re: Typed dataset: Time only data in SQL dateTime Field Stephany Young Microsoft ADO .NET 5 23rd Jan 2007 12:55 AM
RE: Typed dataset: Time only data in SQL dateTime Field WenYuan Wang Microsoft ADO .NET 4 22nd Jan 2007 06:04 PM
Re: Typed dataset: Time only data in SQL dateTime Field Miha Markic [MVP C#] Microsoft ADO .NET 0 19th Jan 2007 08:19 AM
Access2000: Datetime value in query condition Arvi Laanemets Microsoft Access 2 4th Dec 2005 11:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:47 PM.