I get field value from PostgreSQL 8.2 table KLIENT.
Table has date type column kontakteer .
I got PostgreSQL error
ERROR: invalid input syntax for type date: "-infinity"
STATEMENT: UPDATE firma1.klient SET kontakteer = '-infinity' WHERE kood = 'MEISTERMAILI'
Questions:
1. How to disable update command ? I'm only reading data.
2. How to fix buggy update statement ?
-infinity is not allowed aluse for date type, null should be used instead.
Andrus.
My entity class:
Code:
namespace Business {
[Serializable, ActiveRecord("klient",DynamicUpdate=true,Lazy=true,Cache=CacheEnum.NonStrictReadWrite)]
public class KlientEntity : ActiveRecordValidationBase<KlientEntity> {
string kood;
string nimi;
DateTime kontakteer;
[PrimaryKey(PrimaryKeyType.Identity ,"kood", Length=12)]
public virtual string Kood
{
get { return kood; }
set { kood = value; }
}
[Property(Column="nimi", NotNull=true, Length=80)]
public virtual string Nimi
{
get { return nimi; }
set { nimi = value; }
}
public static string GetNimi(string kood) {
KlientEntity e = TryFind(kood);
if (e == null) return String.Empty;
return e.Nimi;
}
[Property(Column="kontakteer")]
public virtual DateTime Kontakteer
{
get { return kontakteer; }
set { kontakteer = value; }
}
}
}