in

System.Data.SQLite

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

DataAdapter.Fill exception: "String was not recognized as a valid DateTime"

Last post 04-10-2012 11:45 AM by michaelgoldstone. 46 replies.
Page 4 of 4 (47 items) < Previous 1 2 3 4
Sort Posts: Previous Next
  • 12-07-2011 3:55 AM In reply to

    Re: DataAdapter.Fill exception: "String was not recognized as a valid DateTime"

     Figured it out, although I still think type conversions should be trapped and a string returned (I know, I know...the whole strongly typed thing...):

     -- slashes must be dashes

    -- Doesn't work for da.Fill(dt);

    insert into person (id, firstname, lastname, creatorid, modifierid, created, modified ) values ('B7154EB2-D2E5-440B-8524-9BE194FABA98', 'Josephine', 'Smith', 0, 0, '2011/12/03 00:00:00', '2011/12/03 00:00:00');

    -- Works

    insert into person (id, firstname, lastname, creatorid, modifierid, created, modified ) values ('B7154EB2-D2E5-440B-8524-9BE194FABA98', 'Josephine', 'Smith', 0, 0, '2011-12-03 00:00:00', '2011-12-03 00:00:00'); 

    Another idea would be to convert slashes to dashes for the caller?

     

  • 04-10-2012 11:45 AM In reply to

    Re: DataAdapter.Fill exception: "String was not recognized as a valid DateTime"

Page 4 of 4 (47 items) < Previous 1 2 3 4
Powered by Community Server (Commercial Edition), by Telligent Systems