Page 1 of 1

Interval data is returned weird

Posted: Sat 17 May 2008 02:09
by aspirevishal
Hi,

For a column returning interval data type of postgresql interval.
Datagridview shows weird data e.g

Code: Select all

"3 mons 27 days"
is displayed as

Code: Select all

27.00:00:00
Is that right ?

Posted: Sat 17 May 2008 08:23
by Alexey.mdr
Please send me (alexeyman*crlab*com) or post here a small test project to reproduce the problem.
Include the definition of your own database objects.
We will investigate the problem.

Posted: Sat 17 May 2008 14:46
by aspirevishal
test data send. Please acknowledge

Posted: Mon 19 May 2008 08:49
by Alexey.mdr
We have received the test data.
We are investigating this problem now.
I will contact you by email in the nearest time.
Could you please specify the versions/editions of:
- PostgreSQLDirect .NET;
- PostgreSQL server;
- OS;
- .NET Framework installed (is it MONO?).

Posted: Mon 19 May 2008 16:41
by aspirevishal
Could you please specify the versions/editions of:
- PostgreSQLDirect .NET 3.50.25
- PostgreSQL server; 8.2.4
- OS; windows xp pro sp3 , tried the same on sp2 results the same
- .NET Framework installed (is it MONO?) , MS .NET 2.0 sp1

and VS 2005

Posted: Tue 20 May 2008 09:37
by Alexey.mdr
Hello,

I have sent you an email with solution.
Let me know if the problem is solved.

Posted: Tue 20 May 2008 15:52
by aspirevishal
No , the problem is stilll their . The interval comes with a trialling time . check the e-mail I have send you.

Posted: Thu 22 May 2008 05:06
by aspirevishal
should I expect something new ?

I mean is something cooking ,as far as this problem is concerned.

Posted: Thu 22 May 2008 13:09
by Alexey.mdr
Please check you email.
The solution is to set a proper format for the column in the DataGridView.

Posted: Thu 22 May 2008 14:53
by aspirevishal
I have already tried that , moreover to best of my knowledge if no formatting is used in DefaultCellStyle property it should return the data as it is .


moreover you have the test case and you could have tried that yourself :shock:

later we could have discussed, how to make it work.

Posted: Fri 23 May 2008 09:36
by Alexey.mdr
Unfortunately, we cannot provide a general advice on using formatting in DataGridView because this topic is beyond the scope of our support program.
TimeSpan struct doesn't have native implemented formatting

Code: Select all

public struct TimeSpan : IComparable, IComparable, IEquatable