Page 1 of 1
Date problem w/ Mono running on a Mac
Posted: Tue 15 Nov 2005 01:54
by Guest
I have a .NET application that runs on the Mac using the Mono Project. All the data looks good except for dates. They are coming back as an empty string or 01/01/01.
using 2.20.12
DB engine 8.01
Any thoughts?
(also, works fine as .NET app and using Mono on WinXP)
Posted: Tue 15 Nov 2005 09:47
by SecureGen
It is a new issue. I need more information about your environment in order to analyze the problem.
Please answer following questions:
- Do you connect to the same PostgreSQL server in both cases?
- Do you have PostrgeSQL server installed on Windows or Mac platform?
- Which protocol do you use for connection?
- Did you try to access this data using strandard tools like pgAdmin? Did you see your datetime fields?
Posted: Tue 15 Nov 2005 17:50
by ComputerAidedTech
- Do you connect to the same PostgreSQL server in both cases?
Yes
- Do you have PostrgeSQL server installed on Windows or Mac platform?
Mac
- Which protocol do you use for connection?
TCP/IP (not sure if this is what you are looking for)
- Did you try to access this data using strandard tools like pgAdmin?
Yes, from both the Mac and XP
Did you see your datetime fields?
Yes - the data looks ok. I did notice that the field I am looking at is a TimeStamp, so I added Date field with the same results.
Posted: Mon 21 Nov 2005 10:23
by SecureGen
We have investigated this situation. In the last version we have problem converting date datatypes using binary ptotocol on Linux and MAC OS. We are going to fix it in the next build.
Now you can try to use the text protocol in you PostgreSQL connection. You should set ";Protocol=2" option in your connection string;
Still does not work - Protocol=2
Posted: Tue 22 Nov 2005 15:59
by ComputerAidedTech
Still does not work - Protocol=2.
I added a IsDBNull check and it is always returning false.
Is this related to the issue?
Did someone verify that setting the Protocol=2 would work?
What is the ETA of this fix? I now have a "hot" client that keeps calling.
Any word on a fix for this?
Posted: Sat 10 Dec 2005 19:05
by ComputerAidedTech
For kicks I tried to use 2.4, but the MonoProject does not have all the .NET 2.0 implmented, so I got an error when loading System.Data.Common.DbConnection.
I also tried your protocol=2 suggestion and that did not work. What am I missing?
I just got another email from my client.
I have to find a soltuon ASAP.
Any thoughts?
Posted: Mon 12 Dec 2005 10:51
by SecureGen
Using the text protocol (protocol=2) is the most compatible way of working with Postgre SQL server on different platforms. Our tests of text protocol with mono do not produce any errors. Please try to use this protocol in your application. If you will have any problem please send me error message and simple example that reproduces your problem. (DDL that creates table with necessary datatypes, and code piece that shows what you are trying to do).
Posted: Tue 13 Dec 2005 18:44
by ComputerAidedTech
There is no error. The date field is always returning IsNULL.
I'll see what I can put together for you.
Posted: Fri 16 Dec 2005 09:53
by SecureGen
We are looking forward for your example (small DDL and code).