Click here to Skip to main content
15,921,210 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i'm built my project and its work very well in visual studio but when i publish it to get installation file when i open it after the publish give me error






 See the end of this message for details on invoking <br />
just-in-time (JIT) debugging instead of this dialog box.<br />
<br />
************** Exception Text **************<br />
System.Data.OleDb.OleDbException (0x80004005): Could not find file 'C:\Users\Miraje\AppData\Local\Apps\2.0\HZE6ZD22.47C\PVNQN9E9.V7C\abfs..tion_f6196fb80399f7f7_0001.0000_aee0b17e46d21524\MyData.mdb'.<br />
   at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)<br />
   at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)<br />
   at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)<br />
   at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)<br />
   at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, ... etc<br />
Posted
Comments
Reza Alipour Fard 14-Jul-13 14:20pm    
Please present you code for define ConnectionString.
You run this app on different computer from Visual Studio Computer?
mohannadzayyad 14-Jul-13 14:23pm    
no i run it from the same computer but from the publish file (install).
and when i open the VS and run it it's work as i want but i think the wrong with the publish couse i have MS access DB
mohannadzayyad 14-Jul-13 14:37pm    
there is someone answer
http://www.codeproject.com/Questions/171600/Creating-setup-project-in-NET-with-MS-Access
but where i find the Common Files folder?
i'm new in vb
mohannadzayyad 14-Jul-13 14:57pm    
he give me this error
C:\Users\Miraje\AppData\Local\Apps\2.0\HZE6ZD22.47C\PVNQN9E9.V7C\abfs..tion_f6196fb80399f7f7_0001.0000_b1db0fe3396b6be4\MyData.mdb'.
that's mean the publish didnt auto copy my data base to the program build and when i copy the file to this path the program work correctly after installing
so how can i make it insert the DB in the instillation
Kschuler 15-Jul-13 14:08pm    
I assume this is a windows forms project? Are you using ClickOnce to publish or are you using a setup project?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900