ActiveXObject support

Nov 3, 2009 at 5:22 PM

We are trying to use the Jint Engine and we are getting "unknown type" for ActiveXObject i.e.( var conn = new ActiveXObject("ADODB.Connection") ) , when I step through the code it gets to the typeresolver and returns a null value. Can you give me some assistance here? I have tried including the namespaces but that didn't seem to help.

Nov 4, 2009 at 6:40 AM

ActiveXObject is not implement as it is not part of the ECMAScript spec. Actually it's something IE is adding to the JS environment dynamically. Though, if you are not bound to this type, you can still instanciate and ADODB.Connection object directly, providing you use the fully qualified name, or you can also directly us System.Data.DbConnection as there are direct bindings with the .NET framework.

It might also be that you need to share scripts between IE and your hosting application, thus I could add a way to define new Classes from the host, though you can also do it inside the script by creating a new wrapping class named ActiveXObject.