jeudi 19 février 2015

Sqlite database unable to open after win apps c# deployment on other pc

I have created an windows application with sqlite database. My sqlite db file is stored in the debug folder of the project.I have used Data Set on several forms to display the data. The setup works fine on my machine but as i install it on other pc's it gives the exception unable to open database as shown in the img.(Exception after deployment


My app.config code is as follows.



<?xml version="1.0"?>
<configuration>
<configSections>
</configSections>
<connectionStrings>
<add name="RConnString" connectionString="Data Source=C:\Users\user\Documents\Visual Studio 2010\Projects\Pathology lab\Pathology lab\bin\Debug\Pathology.sqlite"
providerName="System.Data.Sqlite" />

<add name="Pathology_lab.Properties.Settings.PathologyConnectionString"
connectionString="data source=&quot;C:\Users\user\Documents\Visual Studio 2010\Projects\Pathology lab\Pathology lab\bin\Debug\Pathology.db;"
providerName="System.Data.SQLite" />
<add name="screen_shot.Properties.Settings.PathorecordConnectionString1"
connectionString="Data Source=&quot;Pathorecord.db&quot;;Initial Catalog=test;Integrated Security=True"
providerName="System.Data.SQLite" />
</connectionStrings>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>


I am not able to get exact mistake but I think there is a problem with the connection string. Plz help as i am new to this stuff.


Aucun commentaire:

Enregistrer un commentaire