I am using a .NET 3.5 app with Sql Server Compact 3.5, and when attempting to fetch an entity, I get the error
"SqlCeCommand.CommandTimeout does not support non-zero values."
my App.config is as follows:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="Main.ConnectionString" value="data source=c:\CompactBullon.sdf;"/>
<add key="SqlServerDQECompatibilityLevel" value="4" />
</appSettings>
</configuration>
the DBConnection.GetAdapter is:
public static DataAccessAdapter GetAdapter()
{
return new DataAccessAdapter("Data Source=C:\\CompactBullon.sdf");
}
and I get the error in my "FetchEmployee" function:
public static EmployeeEntity FetchEmployee(Int32 id)
{
EmployeeEntity employee = new EmployeeEntity(id);
IPrefetchPath2 prefetchPath = EmployeePrefetchPath;
using (DataAccessAdapter adapter = DBConnection.GetAdapter())
{
adapter.FetchEntity(employee, prefetchPath);
}
return employee;
}
the call to the function is:
EmployeeEntity employee = EmployeeEntityManager.FetchEmployee(91);
there is employee in the employee table with id 91.
If I comment out the prefetch path, I get the same error.
the template binding that was at the top of the list when the code was generated was:
SD.TemplateBindings.SqlServerSpecific.NET20
I am using the LLBL 2.6 Demo.
the stack trace is as follows:
" at System.Data.SqlServerCe.SqlCeCommand.set_CommandTimeout(Int32 value)\r\n at SD.LLBLGen.Pro.ORMSupportClasses.Query.SetCommandTimeout(Int32 timeoutInterval)\r\n at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.PrepareQueryExecution(IQuery queryToExecute, Boolean forceConnectionSet)\r\n at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.ExecuteSingleRowRetrievalQuery(IRetrievalQuery queryToExecute, IEntityFields2 fieldsToFill, IFieldPersistenceInfo[] fieldsPersistenceInfo)\r\n at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityUsingFilter(IEntityFields2 fieldsToFetch, IFieldPersistenceInfo[] persistenceInfos, IRelationPredicateBucket filter)\r\n at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntityUsingFilter(IEntity2 entityToFetch, IPrefetchPath2 prefetchPath, Context contextToUse, IRelationPredicateBucket filter, ExcludeIncludeFieldsList excludedIncludedFields)\r\n at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntity(IEntity2 entityToFetch, IPrefetchPath2 prefetchPath, Context contextToUse, ExcludeIncludeFieldsList excludedIncludedFields)\r\n at SD.LLBLGen.Pro.ORMSupportClasses.DataAccessAdapterBase.FetchEntity(IEntity2 entityToFetch, IPrefetchPath2 prefetchPath)\r\n at P09X.EmployeeEntityManager.FetchEmployee(Int32 id) in C:\\Projects\\P09X\\EmployeeEntityManager.cs:line 58\r\n at P09X.Form1.btnRunReport_Click(Object sender, EventArgs e) in C:\\Projects\\P09X\\Form1.cs:line 32\r\n at System.Windows.Forms.Control.OnClick(EventArgs e)\r\n at System.Windows.Forms.Button.OnClick(EventArgs e)\r\n at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)\r\n at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)\r\n at System.Windows.Forms.Control.WndProc(Message& m)\r\n at System.Windows.Forms.ButtonBase.WndProc(Message& m)\r\n at System.Windows.Forms.Button.WndProc(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r\n at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms. UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)\r\n at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n at System.Windows.Forms.Application.Run(Form mainForm)\r\n at P09X.Program.Main() in C:\\Projects\\P09X\\Program.cs:line 17\r\n at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)\r\n at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()\r\n at System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n at System.Threading.ThreadHelper.ThreadStart()"