Help with security exception error!

  • Thread starter Thread starter Mech
  • Start date Start date
M

Mech

I am trying to connect to a simple Access Database on my c drive. I am
using Windows 2000 pro; nothing special.

the following code produces a security exception error. Why?

string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;" +
"DataSource=c:\\nwind.mdb";
Conn = new OleDbConnection(ConnStr);

thanks for your help,
Mech.
 
Hi Mech,

Thanks for posting this group.
Is you database table openning?
Make sure your .mdb is closed. And if there are any .ldb file in .mdb
directory, delete it.
Make sure your user account has the permission to access this database.
Beside this, can you show us the error? So that we can help you.

Hope this helps,

Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

--------------------
| From: "Mech" <[email protected]>
| Newsgroups: microsoft.public.dotnet.languages.csharp
| Subject: Help with security exception error!
| Lines: 13
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <[email protected]>
| Date: Thu, 30 Oct 2003 01:52:55 GMT
| NNTP-Posting-Host: 162.83.159.35
| X-Complaints-To: (e-mail address removed)
| X-Trace: nwrdny01.gnilink.net 1067478775 162.83.159.35 (Wed, 29 Oct 2003
20:52:55 EST)
| NNTP-Posting-Date: Wed, 29 Oct 2003 20:52:55 EST
| Path:
cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.su
l.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!in
.100proofnews.com!in.100proofnews.com!cycny01.gnilink.net!cyclone1.gnilink.n
et!spamkiller2.gnilink.net!nwrdny01.gnilink.net.POSTED!53ab2750!not-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.languages.csharp:195258
| X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
|
| I am trying to connect to a simple Access Database on my c drive. I am
| using Windows 2000 pro; nothing special.
|
| the following code produces a security exception error. Why?
|
| string ConnStr = "Provider=Microsoft.Jet.OLEDB.4.0;" +
| "DataSource=c:\\nwind.mdb";
| Conn = new OleDbConnection(ConnStr);
|
| thanks for your help,
| Mech.
|
|
|
 
Back
Top