Security Exception - Opening an Access db

S

steve

This project is going nowwhere fast................

I have an InfoPath form that needs to update an Access database. So
far i can't even open it:
the database is on my hard drive, and no password is set. The
following is the code in my onLoad event on the InfoPath form. (I've
tried it w/out the User ID and password and get the same error.

Dim strConnection As String = _
"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" _
& "C:\My_Data\New Jersey Fees.mdb"
& "User ID=Admin" _
& "Password="
Dim cn As OleDbConnection = New
OleDbConnection(strConnection)
cn.Open()

Error:

System.Security.SecurityException
Request failed.
at
New_Jersey_Request_and_Replies.New_Jersey_Request_and_Replies.OnLoad(DocReturnEvent
e)
at
Microsoft.Office.Interop.InfoPath.SemiTrust._XDocumentEventSink2_SinkHelper.OnLoad(DocReturnEvent
pEvent)
 
D

Don Reamey \(MSFT\)

Make sure your form is running in full trust mode. Go to Tools\Form
Options\Security and Trust.Then change the mode to full trust.
 
S

steve

Make sure your form is running in full trust mode. Go to Tools\Form
Options\Security and Trust.Then change the mode to full trust.

--
Don Reamey
Software Development Engineer
Microsoft Corporationhttp://blogs.officezealot.com/dreamey








- Show quoted text -

thanks for the info......

i check the "full trust" box..... it says to enable full trust the
form must be signed or installed. I publish the form to a SharePoint
library, so i can't install it. so i guess i need to sign it. I
suppose the next step is to purchase a certificate?

is this by only/best option.

thanks for your help!
 
D

Don Reamey \(MSFT\)

You should be able to create a self signed certificate. The certificate tool
should be located in Computer Management under IIS.

--
Don Reamey
Software Development Engineer
Microsoft Corporation
http://blogs.officezealot.com/dreamey

Make sure your form is running in full trust mode. Go to Tools\Form
Options\Security and Trust.Then change the mode to full trust.

--
Don Reamey
Software Development Engineer
Microsoft Corporationhttp://blogs.officezealot.com/dreamey








- Show quoted text -

thanks for the info......

i check the "full trust" box..... it says to enable full trust the
form must be signed or installed. I publish the form to a SharePoint
library, so i can't install it. so i guess i need to sign it. I
suppose the next step is to purchase a certificate?

is this by only/best option.

thanks for your help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top