Problems deploying with access database
Problems deploying with access database
Problems deploying with access database
Problems deploying with access database
Problems deploying with access database
Problems deploying with access database Problems deploying with access database Problems deploying with access database Problems deploying with access database Problems deploying with access database Problems deploying with access database Problems deploying with access database Problems deploying with access database
Problems deploying with access database Problems deploying with access database
Problems deploying with access database
Go Back  Xtreme Visual Basic Talk > > > Problems deploying with access database


Reply
 
Thread Tools Display Modes
  #1  
Old 03-27-2010, 07:45 AM
shags_j shags_j is offline
Newcomer
 
Join Date: Mar 2010
Posts: 2
Default Problems deploying with access database


Hi All,

I have a vb .ne 2008 express program that uses an access database. It all works fine till I install my program. I just put the access database into the application directory. I have been getting an error and have finaly worked out that it is because you need admin access to access the program files directory.

Any ideas on what I should do re this?

Thanks

Shags
Reply With Quote
  #2  
Old 03-27-2010, 08:42 AM
PlausiblyDamp's Avatar
PlausiblyDampProblems deploying with access database PlausiblyDamp is offline
Ultimate Contributor

Forum Leader
* Expert *
 
Join Date: Nov 2003
Location: Newport, Wales
Posts: 2,058
Default

Rather than putting the database into the application folder you might want to consider either the user's My Documents folder or a sub folder off Application Data.
Both of these would be part of the user's profile and a user would have write access to them. VB makes it easy enough to get these locations as well...
Code:
Environment.GetFolderPath( Environment.SpecialFolder.ApplicationData)
'or
Environment.GetFolderPath( Environment.SpecialFolder.MyDocuments)
If the database needs to be shared amongst multiple users of the machine then the Common Data folder might be the best choice.
Code:
 Environment.GetFolderPath( Environment.SpecialFolder.CommonApplicationData)
__________________
Intellectuals solve problems; geniuses prevent them.
-- Albert Einstein

Posting Guidelines Forum Rules Use the code tags
Reply With Quote
  #3  
Old 03-27-2010, 09:26 AM
shags_j shags_j is offline
Newcomer
 
Join Date: Mar 2010
Posts: 2
Default

Cheers thanks for that. Worked a treat. Took me a while to work out how to do it though. Had to change the reference to |datadirectory| because it was an application wide read only variable.

Thanks again,

Shags
Reply With Quote
  #4  
Old 06-24-2011, 08:09 AM
Tinshooter Tinshooter is offline
Newcomer
 
Join Date: Jun 2011
Posts: 2
Default ConnectionString

I think I am having a similar problem with this. My application works great but when I use the setup wizard and package the solution and install it, the access database is nowhere to be found...I have searched so much and cannot find anything at all to help, I think I just really need it spelled out for me.

Anyway, here is the error I am getting:

System.ArgumentException: An OLE DB Provider was not specified in the ConnectionString. An example would be, 'Provider=SQLOLEDB;'.

I can tell I need to do something with the connections string, which is:

<connectionStrings>
<add name="WindowsApplication1.My.MySettings.BackEnd_VBConnectionString"
connectionString="Provider=Microsoft.ACE.OLEDB.12.0;Data Source=&quot;|DataDirectory|\BackEnd VB.accdb&quot;"
providerName="System.Data.OleDb" />
</connectionStrings>

Can someone please point me in the right direction here. I would GREATLY appreciate it, if I am in the wrong place just let me know.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Problems deploying with access database
Problems deploying with access database
Problems deploying with access database Problems deploying with access database
Problems deploying with access database
Problems deploying with access database
Problems deploying with access database Problems deploying with access database Problems deploying with access database Problems deploying with access database Problems deploying with access database Problems deploying with access database Problems deploying with access database
Problems deploying with access database
Problems deploying with access database
 
Problems deploying with access database
Problems deploying with access database
 
-->