By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
458,172 Members | 1,751 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 458,172 IT Pros & Developers. It's quick & easy.

Help with security exception error!

P: n/a
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.
Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a

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" <a@a.com>
| 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: <X9*******************@nwrdny01.gnilink.net>
| Date: Thu, 30 Oct 2003 01:52:55 GMT
| NNTP-Posting-Host: 162.83.159.35
| X-Complaints-To: ab***@verizon.net
| 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!TK2MSFTN GP08.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.gnil ink.net!cyclone1.gnilink.n
et!spamkiller2.gnilink.net!nwrdny01.gnilink.net.PO STED!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.
|
|
|

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.