ExecuteScalar returns TimeSpan for Interval

ExecuteScalar returns TimeSpan for Interval

Postby szinkopa » Thu 30 Jun 2005 13:13

I ran this:

Cmd.CommandText="select cast('1 year' as interval)";
object o=Cmd.ExecuteScalar();


The debugger shows that o contains a TimeSpan, so the year component goes away. This should return PgSqlInterval, shouldn't it?
szinkopa
 
Posts: 16
Joined: Mon 27 Jun 2005 21:12

ExecuteScalar returns TimeSpan for Interval

Postby Yuri » Thu 30 Jun 2005 15:52

Please use method PgSqlDataReader.GetPgSqlInterval() method to obtain a PgSqlInterval value.
Yuri
 
Posts: 140
Joined: Mon 08 Nov 2004 12:07


Return to dotConnect for PostgreSQL