Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What's up with ActiveXObject

Status
Not open for further replies.

phzero

Programmer
Joined
Feb 14, 2002
Messages
86
Location
ZA
Hi all,

I've created an ActiveXObject in my asp page. It works on my machine when I locally test the page, but not on any other machine. The error I get is the following: "Automation Error - Unable to create ActiveX Object". Can anybody tell me where to find the distributable for this component. What do I have to install on the client machine, if anything, for this to work. Here is a fragment of my asp code:

var TelNum, db, rsBrnInfo, rsCostCenter, cmd;

// Instantiate the objects
db = new ActiveXObject("ADODB.Connection");
rsBrnInfo = new ActiveXObject("ADODB.Recordset");
rsCostCenter = new ActiveXObject("ADODB.Recordset");
cmd = new ActiveXObject("ADODB.Command");

This is the only place where I use the ActiveXObject. Any responses will be appreciated
 
You need to install the latest MDAC from msdn.microsft.com

-pete
 
The dll might not be on the client machine or the client might not be able to run the active x control due to securety settings.
This works for IE if the adodb.recordset is installed (you can find the classId "00000535-0000-0010-8000-00AA006D2EA4" as a registry key). If it is not installed you can provide a codebase property of the object tag containing the location of a cab file containing the dll files needed and an inf that will install the ado stuff (works only if the client is allowed to download and install active x controls so you probebly need a signed version because unsigned versions are refused most of the time).
You could allso install MDAC (microsoft data access components).

<object classid=&quot;clsid:00000535-0000-0010-8000-00AA006D2EA4&quot; id=&quot;RSMyRecordSet&quot; onError=&quot;alert('error');&quot;>
</object>
<script>
var objRS = document.getElementById('RSMyRecordSet');
objRS.Open(&quot;select * from tblComputer&quot;, &quot;some connectionstring here&quot;);
alert(objRS.fields.count);
</script>


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top