Page 1 of 1

Composite PK & Windows 2003

Posted: Fri 27 Feb 2009 22:51
by Zoran
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.

Posted: Mon 02 Mar 2009 10:45
by AndreyR
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();

Posted: Wed 04 Mar 2009 12:49
by Zoran
Thanks for the solution. After installing .Net 3.5 SP1 the problem disappeared.