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.
Composite PK & Windows 2003
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:
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();