when i took a look at the generated SQL the problem could be the date format. I had trouble with date queries which behave different on Sql-Server 2000 and 2005 in a multilingual software. We found that we have no trouble if we pass date fields always in american format. As we use SQL-queries in the application we use this code to convert the date fields:
Code:
protected string GetSqlDate(DateTime pDate)
{
// translate date to US-format
return "CONVERT(datetime, '" + pDate.ToString("MM/dd/yyyy") + "', 101)";
}
Because you are using the stored procedure sp_executesql to insert the data you have to pay attention on your date fields as they are passed as string.
Regards
Klaus