• ALinq for Oracle(V2.2) 日期 映射的一个 BUG(已修正)


    看到有朋友在搜索引擎上这个问题。故将这封邮件帖出来。其实碰到一些莫明其妙的问题,最好的办法是给我发电子邮件。


    The Oracle Provider don't recognize the Date type of Oracle database, please set the DbType of Column Mapping as DateTime, just like below
     
    [Column(Storage="_ShippedDate", UpdateCheck=UpdateCheck.Never, DbType="DateTime")]
      public System.Nullable<System.DateTime> ShippedDate
      {
    get;set;
    }
     
    Or do not special the DbType, just like below
    [Column(Storage="_ShippedDate", UpdateCheck=UpdateCheck.Never]
      public System.Nullable<System.DateTime> ShippedDate
      {
    get;set;
    }
     
    It's a bug,  but I have fixed it, i will send you the new version after a few hours.
     
    regard
    Shu Mai
     
     
    ------------------ Original ------------------
    Date:  Tue, Feb 23, 2010 06:31 AM
    To:  "ansiboy"<ansiboy@163.com>;
    Subject:  exception w/ Alinq (oracle db) - pls help!
     
    Hi! Thanks for releasing ALinq.
     
    I'm having a problem inserting a row into an Oracle table. I get the following exception on ..SubmitChanges();.
     
    The specified type 'DATE' is not a valid provider type.
     
       at ALinq.Oracle.OracleDataTypeProvider.a(String A_0, Int32 A_1, Int32 A_2, String[] A_3)
       at ALinq.Oracle.OracleDataTypeProvider.b(String A_0)
       at ALinq.SqlClient.dn.d(String A_0)
       at ALinq.SqlClient.ag.a(MetaDataMember A_0)
       at ALinq.SqlClient.ag.a(a3 A_0, MemberInfo A_1)
       at ALinq.Oracle.i.a(Expression A_0, LambdaExpression A_1)
       at ALinq.SqlClient.b8.e(MethodCallExpression A_0)
       at ALinq.SqlClient.b8.a(MethodCallExpression A_0)
       at ALinq.Oracle.i.a(MethodCallExpression A_0)
       at ALinq.SqlClient.b8.k(Expression A_0)
       at ALinq.SqlClient.b8.i(Expression A_0)
       at ALinq.SqlClient.SqlProvider.BuildQuery(Expression query, ce annotations)
       at ALinq.SqlClient.SqlProvider.Execute(Expression query)
       at ALinq.aa.a.b(c A_0)
       at ALinq.aa.a.c(c A_0)
       at ALinq.y.a(ConflictMode A_0)
       at ALinq.DataContext.SubmitChanges(ConflictMode failureMode)
       at ALinq.DataContext.SubmitChanges()
       at SANArchive.Program.Main(String[] args) in D:\Profiles\SAN\SANArchive\SANArchive\Program.cs:line 208
     
    The oracle table has several data fields of type "Date".
     
    Any ideas?
     
    Thanks for your help!

    

  • 相关阅读:
    oracle函数大全-字符串处理函数
    程序员编程的8条小贴士
    对一个对象实体进行赋值
    一个开源.net混淆器——ConfuserEx (收藏)
    (笑话)切,我也是混血儿,我爸是A型血,我妈是B型血!
    VS2010版快捷键
    常用的织梦dedecms安全设置集合整理
    C/C++ 一些常用的运算符
    对某钓鱼网站的一次失败渗透分析
    MS15-020漏洞测试
  • 原文地址:https://www.cnblogs.com/ansiboy/p/1672832.html
Copyright © 2020-2023  润新知