all groups > vb.net data > may 2006 >
vb.net data :
install Access 2003 mdb to network
Hello. I'm writing an application that, for now, uses an Access 2003 database. If I install my application and the .mdb to c:\program files\vendor\app, it works fine. However, the data in the .mdb needs to be shared by multiple users, so I want the .exe and .mdb on a network drive. When I try to run the .exe from the network, it gives me an error: Request for the permission of type 'System.Data.OleDb.OleDbPermission, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed. Is there something else I need to do to get a database open on a network drive? All help appreciated,
Jim, Thanks for the response. I can change my setup project back to installing the .exe on c:\, but the ..mdb is considered a content file, and it won't let me specify a network path. So should the setup not install the .mdb, and I just copy it to the network from my hard drive when it needs to get updated? Then I have to figure out how to change the connection string so it includes the network path... This is a processor-intensive application, so we have a dedicated PC to run the app, and the users can view the results. Access is fine for now, because I can make schema changes, but eventually I expect we'll migrate to SQL Server. Thanks again for the pointers... -Beth [quoted text, click to view] "Jim Wooley" wrote: > > Hello. > > I'm writing an application that, for now, uses an Access 2003 > > database. > > If I install my application and the .mdb to c:\program > > files\vendor\app, it > > works fine. > > However, the data in the .mdb needs to be shared by multiple users, so > > I want the .exe and .mdb on a network drive. > > > > When I try to run the .exe from the network, it gives me an error: > > Request for the permission of type 'System.Data.OleDb.OleDbPermission, > > System.Data, Version=2.0.0.0, Culture=neutral, > > PublicKeyToken=b77a5c561934e089' failed. > > > > Is there something else I need to do to get a database open on a > > network drive? > > You should be fine with just putting the database on the network drive. The > application should be installed on the client PC. You are running into issues > with Code Access Security by running the client on the network share. Remember > with an Access data store: > > The user needs create/delete permissions on the network directory as a .ldb > file is created when the .mdb is accessed. > Access was not built to scale with many concurrent users. If only a handfull > are accessing it, you should be ok. It has problems as you add more users, > particularly if they are doing edits and not just viewing data. > > Jim Wooley > http://devauthority.com/blogs/jwooley/default.aspx > >
[quoted text, click to view] > Hello. > I'm writing an application that, for now, uses an Access 2003 > database. > If I install my application and the .mdb to c:\program > files\vendor\app, it > works fine. > However, the data in the .mdb needs to be shared by multiple users, so > I want the .exe and .mdb on a network drive. > > When I try to run the .exe from the network, it gives me an error: > Request for the permission of type 'System.Data.OleDb.OleDbPermission, > System.Data, Version=2.0.0.0, Culture=neutral, > PublicKeyToken=b77a5c561934e089' failed. > > Is there something else I need to do to get a database open on a > network drive?
You should be fine with just putting the database on the network drive. The application should be installed on the client PC. You are running into issues with Code Access Security by running the client on the network share. Remember with an Access data store: The user needs create/delete permissions on the network directory as a .ldb file is created when the .mdb is accessed. Access was not built to scale with many concurrent users. If only a handfull are accessing it, you should be ok. It has problems as you add more users, particularly if they are doing edits and not just viewing data. Jim Wooley http://devauthority.com/blogs/jwooley/default.asp
[quoted text, click to view] On Wed, 31 May 2006 13:14:02 -0700, Beth <Beth@discussions.microsoft.com> wrote:
¤ Jim, ¤ Thanks for the response. ¤ I can change my setup project back to installing the .exe on c:\, but the ¤ .mdb is considered a content file, and it won't let me specify a network path. ¤ ¤ So should the setup not install the .mdb, and I just copy it to the network ¤ from my hard drive when it needs to get updated? ¤ ¤ Then I have to figure out how to change the connection string so it includes ¤ the network path... ¤ ¤ This is a processor-intensive application, so we have a dedicated PC to run ¤ the app, and the users can view the results. Access is fine for now, because ¤ I can make schema changes, but eventually I expect we'll migrate to SQL ¤ Server. ¤ ¤ Thanks again for the pointers... ¤ ¤ -Beth I'm not sure what your connection string looks like but can't you just use the network UNC path instead of a drive letter path? I wouldn't install and run the app from the network if it isn't necessary. If you do, each machine that runs this app will need to have its security policy modified. Paul ~~~~
Paul, Thanks for the reply. Yes, I changed the path to the mdb in the app.config file to the network directory without using a drive letter, and changed the setup so it doesn't install the content files, which include the .mdb. I'll need to install changes to the .mdb by manually copying it to the network. The application itself is installed by default on c:\program files\vendor\app\app.exe. So we can run it on a dedicated PC (it takes a few hours to run) and open the .mdb on the network to check the status. Thanks again- that's the solution I was looking for. One where we don't have to change the security policy on each of the clients. -Beth [quoted text, click to view] "Paul Clement" wrote: > On Wed, 31 May 2006 13:14:02 -0700, Beth <Beth@discussions.microsoft.com> wrote: > > ¤ Jim, > ¤ Thanks for the response. > ¤ I can change my setup project back to installing the .exe on c:\, but the > ¤ .mdb is considered a content file, and it won't let me specify a network path. > ¤ > ¤ So should the setup not install the .mdb, and I just copy it to the network > ¤ from my hard drive when it needs to get updated? > ¤ > ¤ Then I have to figure out how to change the connection string so it includes > ¤ the network path... > ¤ > ¤ This is a processor-intensive application, so we have a dedicated PC to run > ¤ the app, and the users can view the results. Access is fine for now, because > ¤ I can make schema changes, but eventually I expect we'll migrate to SQL > ¤ Server. > ¤ > ¤ Thanks again for the pointers... > ¤ > ¤ -Beth > > I'm not sure what your connection string looks like but can't you just use the > network UNC path instead of a drive letter path? > > I wouldn't install and run the app from the network if it isn't necessary. If > you do, each machine that runs this app will need to have its security policy > modified. > > Paul > ~~~~ > Microsoft MVP (Visual Basic)
Hi! I have the same problem, my connection string is System.Windows.Forms.Application.StartupPath & "\myDatabase.mdb" and I placed the database on a network folder that is shared by everyone. My original plan was to place the application and the database at the same directory at the network folder and put a short-cut of the application exe on everyones PC so that they could simply click that short-cut to run the application on the network folder. But sadly, i encountered the same problem Beth experienced. There would be ten users of that application. And you stated that for everyone to run the application on their computer, each machine should have their security policy modified. How can we modify the security policy? thanks! :)
I was hoping they could add something to the setup projects that could do the modifications as part of the install. [quoted text, click to view] "Francis Winter" wrote: > Hi! I have the same problem, my connection string is > System.Windows.Forms.Application.StartupPath & "\myDatabase.mdb" and I > placed the database on a network folder that is shared by everyone. My > original plan was to place the application and the database at the same > directory at the network folder and put a short-cut of the application > exe on everyones PC so that they could simply click that short-cut to > run the application on the network folder. But sadly, i encountered the > same problem Beth experienced. There would be ten users of that > application. And you stated that for everyone to run the application on > their computer, each machine should have their security policy modified. > How can we modify the security policy? thanks! :) > > > > > > *** Sent via Developersdex http://www.developersdex.com ***
[quoted text, click to view] On Tue, 13 Jun 2006 20:57:17 -0700, Francis Winter <papercodes@yahoo.com> wrote:
¤ Hi! I have the same problem, my connection string is ¤ System.Windows.Forms.Application.StartupPath & "\myDatabase.mdb" and I ¤ placed the database on a network folder that is shared by everyone. My ¤ original plan was to place the application and the database at the same ¤ directory at the network folder and put a short-cut of the application ¤ exe on everyones PC so that they could simply click that short-cut to ¤ run the application on the network folder. But sadly, i encountered the ¤ same problem Beth experienced. There would be ten users of that ¤ application. And you stated that for everyone to run the application on ¤ their computer, each machine should have their security policy modified. ¤ How can we modify the security policy? thanks! :) ¤ See if the following helps: How to deploy a .NET Framework application to run from a network location http://support.microsoft.com/?kbid=832742 HOW TO: Build and Deploy a .NET Security Policy Deployment Package http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B815173 Paul ~~~~
Don't see what you're looking for? Try a search.
|
|
|