Saving time from a DataGrid

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
 
G

Guest

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 + "#"
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top