Composite PK & Windows 2003

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for PostgreSQL
Post Reply
Zoran
Posts: 44
Joined: Thu 28 Apr 2005 21:55
Location: Zagreb, Croatia

Composite PK & Windows 2003

Post by Zoran » Fri 27 Feb 2009 22:51

My development web and database servers are Windows 2008.
Our production web server is Windows 2003 and Postgres (the same version) runs on Ubuntu.
The following code in development environment finds a record, which exists in both cases, but on production IIS the result is a "Sequence contains no matching element" exception.

...
var all = dataContext.GetTable();
return all.Single(c => c.ItemKey == "value1" && c.LocationKey == "value2");
...

A simple (1 column) primary key works always fine, but all of the few examples of a 2-column PK I tried used to raise exceptions in Windows 2003.
I use the last (.22) Devart version.

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 02 Mar 2009 10:45

Could you please send me (support * devart * com, subject "Windows 2003 Single trouble") the call stack and the SQL Log?
You can obtain log with the help of the following code:

Code: Select all

        StringBuilder sb = new StringBuilder();
        db.Log = new StringWriter(sb);
...
        string log = sb.ToString();

Zoran
Posts: 44
Joined: Thu 28 Apr 2005 21:55
Location: Zagreb, Croatia

Post by Zoran » Wed 04 Mar 2009 12:49

Thanks for the solution. After installing .Net 3.5 SP1 the problem disappeared.

Post Reply