473,396 Members | 1,886 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.

Saving time from a DataGrid

I have a DataGrid bound to an Access 2K database

entering a time in the grid either via a DatetimePicker or directly into the
field the time displays Ok on the grid but will not update the database
using a DateTimepicker I can see that the value is a string all types in
code and XML schema are dateTime, I have saved the time back to a string
field OK

2 date/time fields formatted dd/mm/yyyy HH:mm in Access - same problem when
formatted at short time and General

Nov 16 '05 #1
2 1239
guy
Hi!
i worked yesterday with vb6 and i had the same problem, the value seem to be
ok but when you enter the value into the datebase you see strange string, i
solved it by adding # before the value and after like that
sSQL+="#" + DTPicker.Value + "#"
"NCrum" wrote:
I have a DataGrid bound to an Access 2K database

entering a time in the grid either via a DatetimePicker or directly into the
field the time displays Ok on the grid but will not update the database
using a DateTimepicker I can see that the value is a string all types in
code and XML schema are dateTime, I have saved the time back to a string
field OK

2 date/time fields formatted dd/mm/yyyy HH:mm in Access - same problem when
formatted at short time and General

Nov 16 '05 #2
Thanks
Nice try, I had not thought of that one, been using it for years, however,
no luck
I am not wrting directly to an update query but though a dataSet
Interstingly when I added "#"+ to the return value from the timepicker the
"#'s" were removed from the string

I do notice that there are a lot of DBDate 's in the paramters sadly
changing these to DBTime does nothing but cause more problems

"guy" wrote:
Hi!
i worked yesterday with vb6 and i had the same problem, the value seem to be
ok but when you enter the value into the datebase you see strange string, i
solved it by adding # before the value and after like that
sSQL+="#" + DTPicker.Value + "#"
"NCrum" wrote:
I have a DataGrid bound to an Access 2K database

entering a time in the grid either via a DatetimePicker or directly into the
field the time displays Ok on the grid but will not update the database
using a DateTimepicker I can see that the value is a string all types in
code and XML schema are dateTime, I have saved the time back to a string
field OK

2 date/time fields formatted dd/mm/yyyy HH:mm in Access - same problem when
formatted at short time and General

Nov 16 '05 #3

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

Similar topics

2
by: Oldhandandy | last post by:
I have a datagrid linked to a SQL Stored Procedure, the data is extracted from 4 tables. Data is only updated not inserted and the update is to only 1 of the tables, the other three tables are...
0
by: Jan Keller | last post by:
Hello all, I am using an XmlTextReader and a DataSet to populate a DataGrid: ds = New DataSet xr = New XmlTextReader(path) ds.ReadXml(xr) xr.Close() dv = New DataView(ds.Tables.Item(0))
14
by: Amitabh Deepak | last post by:
Is there any way to check whether daylight saving is enabled on a linux machine?
4
by: Sangeetha. | last post by:
I have a datagrid with just one row. When I edit the contents of the datagrid and click on Save button (somewhere else in the form), the changes are lost. However, if I click TAB from the editable...
2
by: Jay Walker | last post by:
I created a custom DataGridColumn based on Marcie Robillard's MSDN Article: Creating Custom Columns for the ASP.NET Datagrid...
1
by: Nikhil Patel | last post by:
Hi, I bind a grid to a DataView object. I lose the reference to the underlying DataTable and the DataSet in a postback. Here is the code. Page_Load works fine and I am able to see the rows in...
6
by: arun.hallan | last post by:
Hi, I have a datagrid whose datasource is a datatable which is saved to viewstate on page_load. I also have a cached string which handles what is shown on the rowfilter of the dataview of...
1
by: maflatoun | last post by:
Hi everyone, I have 3 different time zones that I'm working with. Basically converting from UTC to those 3 time zones. Eastern Daylight Time (GMT -04:00, New York) Central Daylight Time (GMT...
27
by: RobG | last post by:
I was investigating a function to determine whether daylight saving was being observed on a particular date (given the platform's regional settings) and came across a suggestion at merlyn.com to...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.