2
votes

I have a field in my postgres database using the time (without time zone) data type. I have a Microsoft Access front-end for the database connected using psqlODBC, which reads this field as a "Date/Time" data type.

If I try to insert something into the field through the front end, I get the following error:

ODBC - insert on a linked table "table_name" failed. 
ERROR: column "column_name" is of type time without time zone but expression is of type date;

I'm assuming that access is trying to input a time stamp instead.

Basically my question is it even really possible to use the time data type with Access? Or should I just be using the timestamp datatype instead?

1

1 Answers

1
votes

If you are manually typing data into a linked table then no this won't be possible at present, if you have the option of updating your table via forms or VB then you could try this to get access to produce only a time value:

TimeSerial(Hour(Now()), Minute(Now()), Second(Now()))

Otherwise as you say, it's probably a good idea to change your data type to timestamp.