Cannot run ActiveX objects in Trusted Form

  • Thread starter Installing W2003 on BM Infinity 4500R
  • Start date
I

Installing W2003 on BM Infinity 4500R

The Situation:

We have developed a workflow application whose main components are: Infopath
forms for data entry into an Access database (later to be SQL Server) and MS
Word documents for displaying results. In between these two MS apps we have
developed a proprietary app based on VB.NET. The Infopath documents and MS
Word documents are published to Sharepoint Services for dissemination to
Intranet users.

The Infopath form has several cascading dropdowns. I use secondary data
sources to populate the dropdown. Jscript code behind is used to filter the
child dropdowns according to choises in the parent dropdown. Jscript
procedures perfom also various data checking.

Jcript is used also to write routines that directly read database tables and
write to database tables using ActiveX Objects. The code I use is simple:

// Connect to the Sentinel Database
var strDbPath = "\\" + "\\" + "Sharepoint1\\MSDatabase\\Sentinel040214.mdb";
var ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
strDbPath;

adoCn = new ActiveXObject("ADODB.Connection");
adoCn.Open (ConnectString);

Finally, I have followd all instructions to publish the Infopath form as a
fully trusted form.

Now the Problem:

1. When I open the Infopath Form the jscript code runs correctly until it
reaches the adoCn.Open (ConnectString) command.

2, The error message is:
"Safety settings on this computer prohibit accessing a data source on
another domain.

File:script.js

Line:557"

Conclusions:
1. If I comment out all references to ActiveX objects, the form runs correctly
2. I have verified that the form runs as a fully trusted form. The
left-bottom corner of the screen displays a small green checkmark. Hovering
over displays "fully trusted form"
3. I have lowered the Security setting of Trusted Sites in IE at the server
to "Low"
3. All documentation I have read tells me that the form containing ActiveX
documents should run as a fully trusted form. Obviously this is not working
in my case.

What am I doing wrong? Is there anything in addition to setting the form as
a fully trusted form that would permit to run ActiveX objects?

Any help on the matter will be higly appreciated. We are rapidly reaching
deadline time and we are floundering
 
S

Steve van Dongen [MSFT]

"Installing W2003 on BM Infinity 4500R"
The Situation:

We have developed a workflow application whose main components are: Infopath
forms for data entry into an Access database (later to be SQL Server) and MS
Word documents for displaying results. In between these two MS apps we have
developed a proprietary app based on VB.NET. The Infopath documents and MS
Word documents are published to Sharepoint Services for dissemination to
Intranet users.

The Infopath form has several cascading dropdowns. I use secondary data
sources to populate the dropdown. Jscript code behind is used to filter the
child dropdowns according to choises in the parent dropdown. Jscript
procedures perfom also various data checking.

Jcript is used also to write routines that directly read database tables and
write to database tables using ActiveX Objects. The code I use is simple:

// Connect to the Sentinel Database
var strDbPath = "\\" + "\\" + "Sharepoint1\\MSDatabase\\Sentinel040214.mdb";
var ConnectString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" +
strDbPath;

adoCn = new ActiveXObject("ADODB.Connection");
adoCn.Open (ConnectString);

Finally, I have followd all instructions to publish the Infopath form as a
fully trusted form.

Now the Problem:

1. When I open the Infopath Form the jscript code runs correctly until it
reaches the adoCn.Open (ConnectString) command.

2, The error message is:
"Safety settings on this computer prohibit accessing a data source on
another domain.

File:script.js

Line:557"

Conclusions:
1. If I comment out all references to ActiveX objects, the form runs correctly
2. I have verified that the form runs as a fully trusted form. The
left-bottom corner of the screen displays a small green checkmark. Hovering
over displays "fully trusted form"
3. I have lowered the Security setting of Trusted Sites in IE at the server
to "Low"
3. All documentation I have read tells me that the form containing ActiveX
documents should run as a fully trusted form. Obviously this is not working
in my case.

What am I doing wrong? Is there anything in addition to setting the form as
a fully trusted form that would permit to run ActiveX objects?

Any help on the matter will be higly appreciated. We are rapidly reaching
deadline time and we are floundering

See #3
http://groups.google.com/[email protected]

Regards,
Steve
 
I

Installing W2003 on BM Infinity 4500R

Thank you, Steve:

I managed to successfully define an ADO connection in a trusted form.
However, I now need the Trusted-Form equivalent to and ADO Command, namely:

var cmd = new ActiveXObject("ADODB.Command");

I need this command to write to a table in the database. I shall appreciate
your help on this matter

As a final request, where can find a complete list of trusted-form ActiveX
objects? I feel I will need to master this list if I am to develop InfoPath
forms of any complexity at all.

Thanks

Jose
 
S

Steve van Dongen [MSFT]

I managed to successfully define an ADO connection in a trusted form.
However, I now need the Trusted-Form equivalent to and ADO Command, namely:

var cmd = new ActiveXObject("ADODB.Command");

I need this command to write to a table in the database. I shall appreciate
your help on this matter

As a final request, where can find a complete list of trusted-form ActiveX
objects? I feel I will need to master this list if I am to develop InfoPath
forms of any complexity at all.

I listed them all in the thread I referred to. There are only methods
to create Connection and Recordset objects.

Regards,
Steve
 

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