connecting to Access with c#

Post Reply
User avatar
Graeme
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

connecting to Access with c#

Post by Graeme »

We are having some issues with connecting to an Access table with c#. This table is on the same computer as the calling code, and we have set no security on this table.



When issuing the open() command, we get the message 'request for the permission of type 'system.data.oledb.oledbpermission ...... ' failed.



When we look this up on the interweb (including the numerical error code .... above) all the juice is about network access, and permissioning.



We can get this to work just fine when this code is executed using a c# form/exe, but not when this code is in a dll. The dll is COM-enabled and called from vba.
Graeme West
weismat2
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

connecting to Access with c#

Post by weismat2 »

Have look here: Code Access Security Policy Tool
User avatar
Graeme
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

connecting to Access with c#

Post by Graeme »

We've seen that. It seems like going to a knife fight with a nuclear device.
Graeme West
User avatar
yanko
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

connecting to Access with c#

Post by yanko »

In my (limited) experience in access-vba communication such errors generally mean that some driver isn't updated/properly configured, or is simply missing. Maybe you should consider looking into it as a driver issue.



My 2 cents.
weismat2
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

connecting to Access with c#

Post by weismat2 »

This whole thing depends where you are working at.

If you manage everything yourself in a small shop, then it is painful as you need many tries and then suddenly it works.

At a large shop, you may find someone competent, but it is more a problem to get the process working/kicking the right people.
User avatar
Graeme
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

connecting to Access with c#

Post by Graeme »

Yanko, thanks for the pointer.
Graeme West
User avatar
Graeme
Posts: 0
Joined: Thu Jan 01, 2004 12:00 am

connecting to Access with c#

Post by Graeme »

It was a missing driver! Thanks!
Graeme West
Post Reply