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

2 posts, 0 answers
  1. Alex
    Alex avatar
    1 posts
    Member since:
    Mar 2011

    Posted 31 Mar 2011 Link to this post

    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

  2. Ady
    Admin
    Ady avatar
    588 posts

    Posted 06 Apr 2011 Link to this post

    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
  3. DevCraft banner
Back to Top