Hi, i have winforms desktop application. My app is multithreaded. I use SQL Server CE 3.5. In the each thread i create the IObjectScope. All works fine, bur sometimes i get exception like this:
Telerik.OpenAccess.RT.sql.SQLException: The path is not valid. Check the
directory for the database. [ Path = data\mydb.sdf ]
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.DBDriver.connect(ConnectionString connectionString, IDictionary driverProps)
at OpenAccessRuntime.Relational.conn.RelationalConnectionPool.createRealCon()
or
LOCK_TIMEOUT=5000 Telerik.OpenAccess.RT.sql.SQLException: The path is
not valid. Check the directory for the database. [ Path =
data\mydb.sdf ]
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.DBDriver.connect(ConnectionString connectionString, IDictionary driverProps)
at
OpenAccessRuntime.Relational.conn.RelationalConnectionPool.createRealCon()
---> Telerik.OpenAccess.RT.sql.SQLException: The path is not valid.
Check the directory for the database. [ ...' --->
Telerik.OpenAccess.OpenAccessException:
Telerik.OpenAccess.Exceptions.DataStoreException: Unable to connect to
Backend=sqlce;Driver=genericADO2;ConnectionString=data
source=data\mydb.sdf:
Telerik.OpenAccess.RT.sql.SQLException: The path is not valid. Check the
directory for the database. [ Path = data\mydb.sdf ]
at Telerik.OpenAccess.RT.Adonet2Generic.Impl.DBDriver.connect(ConnectionString connectionString, IDictionary driverProps)
at OpenAccessRuntime.Relational.conn.RelationalConnectionPool.createRealCon()
My app.config
<?xml version="1.0"?>
<configuration>
<configSections>
<section name="openaccess" type="Telerik.OpenAccess.Config.ConfigSectionHandler, Telerik.OpenAccess.Config, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="mycon" connectionString="data source=Data\mydb.sdf" providerName="Microsoft.SqlServerCe.Client.3.5" />
</connectionStrings>
<openaccess xmlns="http://www.telerik.com/OpenAccess">
<references>
<reference assemblyname="Domain" configrequired="True" />
</references>
<connections>
<connection id="mycon">
<connectionString>Data Source=Data\mydb.sdf</connectionString>
<backendconfigurationname>sqlceConfiguration</backendconfigurationname>
</connection>
</connections>
<backendconfigurations>
<backendconfiguration id="sqlceConfiguration" backend="sqlce">
<mappingname>sqlceMapping</mappingname>
</backendconfiguration>
</backendconfigurations>
<mappings current="sqlceMapping">
<mapping id="sqlceMapping" />
</mappings>
</openaccess>
</configuration>
Please, help to find the solution