in

System.Data.SQLite

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

Date columns comming into DataTable as String types.

Last post 08-23-2010 7:18 PM by Lojikl. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 08-17-2010 6:51 PM

    • Lojikl
    • Not Ranked
    • Joined on 02-20-2007
    • Posts 2

    Date columns comming into DataTable as String types.

    Hi,

    I've noticed in version 66 of the provider, if I do a simple   SELECT StartDate [Start] FROM ATable    the datatable that is returned has column of type String , not of Date.

    This was not the case in previous version we used which was 1.0.60   Help !

  • 08-17-2010 6:59 PM In reply to

    Re: Date columns comming into DataTable as String types.

    First thing I'd need to know is what your table definition looks like.

  • 08-23-2010 7:18 PM In reply to

    • Lojikl
    • Not Ranked
    • Joined on 02-20-2007
    • Posts 2

    Re: Date columns comming into DataTable as String types.

    Hi,

    A particular example of a table where this is happening is defined as

    CREATE TABLE [Drilling Wells and TD] ([WellCode] INTEGER ,[StartYear] TEXT ,[StartMonthYear] TEXT ,[Htactualtd_Wellcode] INTEGER ,[Seqno] INTEGER ,[Starttime] DATETIME ,[Endtime] DATETIME ,[Duration] DOUBLE ,[Startmd] DOUBLE ,[Endmd] DOUBLE ,[Classcode] TEXT ,[Opscode] TEXT ,[Majoroperation] TEXT ,[Phase] TEXT ,[Troubletype] TEXT ,[Cumulativedur] DOUBLE ,[CompanyCode1] TEXT ,[CompanyCode2] TEXT ,[CompanyCode3] TEXT ,[CompanyCode4] TEXT ,[CompanyCode5] TEXT ,[RunnCost] DOUBLE ,[MilestoneNo] INTEGER ,[MilestoneDesc] TEXT ,[WELL_Wellcode] INTEGER ,[Wellname] TEXT ,[Wellfield] TEXT ,[Latdeg] INTEGER ,[Latmin] INTEGER ,[Latsec] DOUBLE ,[Longdeg] INTEGER ,[Longmin] INTEGER ,[Longsec] DOUBLE ,[Rkbtowellhead] DOUBLE ,[Waterdepth] DOUBLE ,[Startdate] DATETIME ,[Spuddate] DATETIME ,[Tddate] DATETIME ,[Mdtotal] DOUBLE ,[Tvdtotal] DOUBLE ,[Totdrilled] DOUBLE ,[X_PK_] INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT  ); 

     

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