DBI help (via Win32 Extensions)
Matthias
matthias_w at my-deja.com
Tue May 2 11:30:01 EDT 2000
More information about the Python-list mailing list
Tue May 2 11:30:01 EDT 2000
- Previous message (by thread): ODBC / DBI help (via Win32 Extensions)
- Next message (by thread): ANN: gdchart-0.4
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hy Benjamin :-) I don't know too much about Access & SQL, but on date-time fields have usually a format like "YYYY-MM-DD HH:mm:SS" or "YYYY-MM-DD HH:mm:SS.s" s.. stands for fraction of seconds (ms) HTH Matthias In article <rNHvjEdhm5Pp-pn2-dzBINcOCBoWi at d185d18f2.rochester.rr.com>, junkster at rochester.rr.com wrote: > On Sun, 29 Apr 3900 04:49:53, "S. Hoon Yoon" <cpu at bigfoot.com> wrote: > > > I think that's because you should use format #date# on update. Unless, I did > > not understand your problems. > > That's really more of SQL and access convention rather than Python. > > Pls look at the docs for Access and SQL. > > > > UPDATE [BT Dates] SET [BT Dates].[date] = #12/12/2000#; > > > > This is what I get if I use Query wizard and you should follow it. > > Hope it helps, > > The real problem is that I can't find any documentation on the DBI > module... > > The pound convention I found out about... > Unfornately, I don't have my code with me... But...(From memory) > > sql_cmd = """ > INSERT INTO logfile (datetime, loglevel,, logdata) > VALUES ('#12/15/2000#', 1, 'test') > """ > # I've tried 12/15/00, 09/09/99, 09/09/1999, and a few other > # date variants.... > > # And as far as I can tell the ODBC execute command > # appends a semicolon? Or at least everything works > # without having me add one... > > If I attempt to execute that command, I get a SQL error from the ODBC > driver. > > If I remove the datetime field and just submit using the loglevel, > logdata > it works fine... (But that sort of defeats the purpose of a log > file....) > > The datetime field is setup in Access as a standard "Date/Time" > field, so I figure I might need to convert the datetime field into a > dbiDate > record, but as I mentioned I can't find any instructions on the fields > & > methods for the dbiDate field(s).... (I checked the Win 32 > documentation > without any luck). > > - Benjamin > Sent via Deja.com http://www.deja.com/ Before you buy.
- Previous message (by thread): ODBC / DBI help (via Win32 Extensions)
- Next message (by thread): ANN: gdchart-0.4
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list