DATE/TIME problem with Microsoft Access and DBD::ODBC 
Author Message
 DATE/TIME problem with Microsoft Access and DBD::ODBC

I'm having problems adding a row to Microsoft Access if I want to add a
timestamp or time value through Perl's DBI/DBD::ODBC modules.

What I want to do via SQL is something like
INSERT INTO my_table (event_date, end_time) VALUES ({d '2002-02-28'}, {ts
'2002-02-28 12:15:00})

In my Microsoft Access database, event_date is of type Date/Time (Short
Date) and end_time is of type Date/Time (Long Time).  I can add the date by
itself, so {d '2002-02-28'} works.  But I can't add the time value.
I've tried using {t '12:15:00'} and #2002-02-28 12:15:00# but neither works.

I'm using
use DBI;
use DBD::ODBC;

If I use the timestamp as above, I get "Syntax error in string in query
expression 'ts '2002-02-28 12??}"

If I use the # date format, I get "COUNT field incorrect" error.

I have no idea what to do.  I've searched in vain to try new things, tried
to read documentaion. One thing I tried was
use DBI qw(:sql_types);

It didn't help.

I also tried changing the setting in MS Access of end-time.  General date,
short date, long time, short time, etc.  Still no good.

Anybody have any ideas??


Sat, 21 Aug 2004 17:46:15 GMT  
 [ 1 post ] 

 Relevant Pages 

1. DBD::ODBC, Microsoft Access Date/Time help

2. DBD::ODBC DBI and Microsoft Access memo field

3. DBD/DBI ODBC and Microsoft Access 97 memo field

4. DBD::ODBC / Win32::ODBC access problem

5. DBD::ODBC and date/time field overflow

6. DBD::ODBC and date/time fields

7. MS Access, Linux, DBI, DBD::ODBC, Easysoft's ODBC-ODBC Bridge

8. Problem with dbi, dbd-odbc reading from Access

9. Problem with dbi, dbd-odbc reading from Access

10. Can't get a value from microsoft access using win32::ODBC

11. Win32::ODBC, MIcrosoft Driver and MS-Access System Tables

12. date/time - seconds == date/time?


Powered by phpBB® Forum Software