This is a migrated thread and some comments may be shown as answers.

SQL Server CE 3.5. The path is not valid. Check the directory for the database.

1 Answer 144 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Alex
Top achievements
Rank 1
Alex asked on 31 Mar 2011, 09:41 AM

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

1 Answer, 1 is accepted

Sort by
0
Ady
Telerik team
answered on 06 Apr 2011, 09:19 AM
Hi Alex,

 Can you check the inner exception, if it exists? Does this usually happen when there is a long running query? If so, can you try increasing the 'Lock Timeout' value via the 'Model Settings' dialog, in the designer?

Greetings,
Ady
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Development (API, general questions)
Asked by
Alex
Top achievements
Rank 1
Answers by
Ady
Telerik team
Share this question
or