473,396 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

DateTime not being saved in Access DB

I just created a mini-app (WinForms in C#) with a bound data grid whose
data source is an Access database. It has 2 DateTime columns. I
formatted the database so one of columns was GeneralDate and the other
LongTime. If I type directly into the Access db, both columns display
fine. When I run the app, the data loads correctly. However, if I key
from the grid and call the DataAdapter's Update method, the time portion
gets set to midnight and doesn't retain the time I entered. I called
the dataset's WriteXML method and check the output and that also results
in a correct format. It seems that only the Update method screws up.
Does anybody know what's going on?
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #1
3 1455
how are the columns defined in the XSD?

sandman wrote:
I just created a mini-app (WinForms in C#) with a bound data grid whose
data source is an Access database. It has 2 DateTime columns. I
formatted the database so one of columns was GeneralDate and the other
LongTime. If I type directly into the Access db, both columns display
fine. When I run the app, the data loads correctly. However, if I key
from the grid and call the DataAdapter's Update method, the time portion
gets set to midnight and doesn't retain the time I entered. I called
the dataset's WriteXML method and check the output and that also results
in a correct format. It seems that only the Update method screws up.
Does anybody know what's going on?
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #2
how are the columns defined in the XSD?

sandman wrote:
I just created a mini-app (WinForms in C#) with a bound data grid whose
data source is an Access database. It has 2 DateTime columns. I
formatted the database so one of columns was GeneralDate and the other
LongTime. If I type directly into the Access db, both columns display
fine. When I run the app, the data loads correctly. However, if I key
from the grid and call the DataAdapter's Update method, the time portion
gets set to midnight and doesn't retain the time I entered. I called
the dataset's WriteXML method and check the output and that also results
in a correct format. It seems that only the Update method screws up.
Does anybody know what's going on?
*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 16 '05 #3
I generated the dataset from the data adapter and then changed the type
of the time column to Time. Other than that it's the default. The other
one is DateTime.

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 16 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: BjörnHolmberg | last post by:
Hi everyone! In the following code we get a UTC offset in xml. Since I want my WAP users in UTC+02:00 to see data on a server in some US time zone, a lot of confusion will be created from this...
4
by: Kim Würtz | last post by:
Hi folks I have an C# app. connecting to a MS-ACCESS database with several tables. In a specific situations I have problems with a DateTime type in a table. The problem is when I want to...
0
by: sandman | last post by:
I just created a mini-app (WinForms in C#) with a bound data grid whose data source is an Access database. It has 2 DateTime columns. I formatted the database so one of columns was GeneralDate and...
4
by: John J. Hughes II | last post by:
I have several functions that save the time when they did certain tasks to an SQL table. This was working fine as far as I could tell but I now have systems that are updating thousands of records...
11
by: Cor Ligthert | last post by:
Hello everybody, Jay and Herfried are telling me every time when I use CDate that using the datetime.parseexact is always the best way to do String to datetime conversions. They don't tell why...
4
by: Lucvdv | last post by:
I have to connect to a server set up by the government, where they used Apache Axis to create a webservice. The code I use to interface to the webservice is generated by wsdl.exe, based on a...
6
by: rn5a | last post by:
I am inserting records in a MS-Access database table. The data type of one of the columns named *OrderDate* in the DB table is Date/Time. This is the SQL query I am using to insert the records in...
1
by: remya1000 | last post by:
In database the date is saved as 2/26/2007 8:45:38 AM but while displaying the date in a table,i need to display it as this 2/26/2007 write now in table its displaying as datetime. i'm using...
6
by: Manikandan | last post by:
Hi, I need to insert the datetime with milliseconds value into a datarow. My code as below DataTable testDataTable=new DataTable(); testDataTable.Columns.Add("updatedDateTime",...
4
by: Manikandan | last post by:
Hi, I'm inserting a datetime values into sql server 2000 from c# SQL server table details Table name:date_test columnname datatype No int date_t DateTime ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.