in

System.Data.SQLite

An open source ADO.NET provider for the SQLite database engine

Does CURRENT_TIMESTAMP work?

Last post 08-24-2006 6:30 PM by Robert Simpson. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 08-24-2006 2:34 AM

    Does CURRENT_TIMESTAMP work?

    Hi, it's me again.
    I had some troubles with the provider and SQLite administrator as reported  in this thread .
    Looks like that tool actually inserts wrong formatted dates, even if they are generated as defaults ...

    A related bug with that tool was that when I created a field of time TIMESTAMP with default "CURRENT_TIMESTAMP" actually the editor substituted the value (the date and time) to the "CURRENT_TIMESTAMP" constant in the edithing phase, thus requiring always a re-edit of that fields.
    Maybe I can't explain it clearly: I define a table, in the definition SQL there's a field with default "CURRENT_TIMESTAMP", everything is ok ... but when I edit the table it's like I had defined that field with a specific date/time value, like "2099/01/01 12:00:00".

    So , I thought, the SQLite administrator has a bug, and actually retrieves from the db the definition of the table with some error, and shows the value instead of the constant.

    Now I', trying "SQLite Maestro", in my quest for a reliable SQLite tool .

    SURPRISE! The behaviour is the same! It's impossible to edit the table without having the constant changed in the actual value ....

    So now I'm wondering: is it a bug (the same bug?) of TWO DIFFERENT tools from two different authors, or is it the "CURRENT_TIMESTAMP" portion of the SQLite library that is buggy?

    Literally, after searching for several days, I'm unable to find a tools that looks STABLE and RELIABLE for simple editing of SQLite databases ... How do you manage to do that? Any suggestions? Has anybody seen the same behaviour?

  • 08-24-2006 2:55 AM In reply to

    Re: Does CURRENT_TIMESTAMP work?

    The SAME in SQLite Analyzer (3.0.4) !!!!!!!!!!!!!

    Is this a bug of some version of SQlite.dll????

    How do you edit the timestamp fields ????
  • 08-24-2006 5:56 AM In reply to

    • pLu
    • Top 100 Contributor
    • Joined on 12-05-2005
    • Sweden
    • Posts 13

    Re: Does CURRENT_TIMESTAMP work?

    I take it you are using ALTER TABLE which has some limitations.

    "The column may not have a default value of CURRENT_TIME, CURRENT_DATE or CURRENT_TIMESTAMP."

  • 08-24-2006 6:30 PM In reply to

    Re: Does CURRENT_TIMESTAMP work?

    Ok I know what the problem is.  Dr. Hipp fixed this bug recently, but if it isn't fixed in 3.3.7, it is definitely fixed for the next release.

    Here was the ticket that got this resolved:

    http://www.sqlite.org/cvstrac/tktview?tn=1919

    Robert

     

Page 1 of 1 (4 items)
Powered by Community Server (Commercial Edition), by Telligent Systems