www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to connect MS-access database using C#.Net?

  1. #1

    How to connect MS-access database using C#.Net?

    How to connect MS-access database using C#.Net.??

    I'm using code as follow:

    Code:
    <add name="localhost" connectionString="Provider=Microsoft.Jet.OLEDB.4.0; Data Source=data\guestbook.mdb;Jet OLEDB:Database Password=data123;"/>

    But I'm getting Error msg as follow:

    "System.Security.SecurityException: Request for the permission of type 'System.Data.OleDb.OleDbPermission, System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

  2. #2
    Join Date
    Oct 2009
    Posts
    658
    http://www.dofactory.com/Connect/Connect.aspx#_self15

    Anyways without seeing the entire stack trace I can say that it's a system security exception. Are you sure that your application have enough credentials to access the db?
    Good Luck

    Santos Systems

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles