Saving time from a DataGrid

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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 + "#"
 
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
 
Back
Top